Documentation ¶
Index ¶
- Constants
- type CommitDetails
- type CopRuntimeStats
- type ExecDetails
- type RuntimeStats
- type RuntimeStatsColl
- func (e *RuntimeStatsColl) ExistsCopStats(planID string) bool
- func (e *RuntimeStatsColl) ExistsRootStats(planID string) bool
- func (e *RuntimeStatsColl) GetCopStats(planID string) *CopRuntimeStats
- func (e *RuntimeStatsColl) GetRootStats(planID string) *RuntimeStats
- func (e *RuntimeStatsColl) RecordOneCopTask(planID, address string, summary *tipb.ExecutorExecutionSummary)
Constants ¶
const ( // ProcessTimeStr represents the sum of process time of all the coprocessor tasks. ProcessTimeStr = "Process_time" // WaitTimeStr means the time of all coprocessor wait. WaitTimeStr = "Wait_time" // BackoffTimeStr means the time of all back-off. BackoffTimeStr = "Backoff_time" // RequestCountStr means the request count. RequestCountStr = "Request_count" // TotalKeysStr means the total scan keys. TotalKeysStr = "Total_keys" // ProcessKeysStr means the total processed keys. ProcessKeysStr = "Process_keys" )
const CommitDetailCtxKey = "commitDetail"
CommitDetailCtxKey presents CommitDetail info key in context.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommitDetails ¶
type CommitDetails struct { GetCommitTsTime time.Duration PrewriteTime time.Duration CommitTime time.Duration LocalLatchTime time.Duration TotalBackoffTime time.Duration ResolveLockTime int64 WriteKeys int WriteSize int PrewriteRegionNum int32 TxnRetry int }
CommitDetails contains commit detail information.
type CopRuntimeStats ¶
CopRuntimeStats collects cop tasks' execution info.
func (*CopRuntimeStats) RecordOneCopTask ¶
func (crs *CopRuntimeStats) RecordOneCopTask(address string, summary *tipb.ExecutorExecutionSummary)
RecordOneCopTask records a specific cop tasks's execution detail.
func (*CopRuntimeStats) String ¶
func (crs *CopRuntimeStats) String() string
type ExecDetails ¶
type ExecDetails struct { CalleeAddress string ProcessTime time.Duration WaitTime time.Duration BackoffTime time.Duration RequestCount int TotalKeys int64 ProcessedKeys int64 CommitDetail *CommitDetails }
ExecDetails contains execution detail information.
func (ExecDetails) String ¶
func (d ExecDetails) String() string
String implements the fmt.Stringer interface.
func (ExecDetails) ToZapFields ¶
func (d ExecDetails) ToZapFields() (fields []zap.Field)
ToZapFields wraps the ExecDetails as zap.Fields.
type RuntimeStats ¶
type RuntimeStats struct {
// contains filtered or unexported fields
}
RuntimeStats collects one executor's execution info.
func (*RuntimeStats) Record ¶
func (e *RuntimeStats) Record(d time.Duration, rowNum int)
Record records executor's execution.
func (*RuntimeStats) SetRowNum ¶
func (e *RuntimeStats) SetRowNum(rowNum int64)
SetRowNum sets the row num.
func (*RuntimeStats) String ¶
func (e *RuntimeStats) String() string
type RuntimeStatsColl ¶
type RuntimeStatsColl struct {
// contains filtered or unexported fields
}
RuntimeStatsColl collects executors's execution info.
func NewRuntimeStatsColl ¶
func NewRuntimeStatsColl() *RuntimeStatsColl
NewRuntimeStatsColl creates new executor collector.
func (*RuntimeStatsColl) ExistsCopStats ¶
func (e *RuntimeStatsColl) ExistsCopStats(planID string) bool
ExistsCopStats checks if the planID exists in the copStats collection.
func (*RuntimeStatsColl) ExistsRootStats ¶
func (e *RuntimeStatsColl) ExistsRootStats(planID string) bool
ExistsRootStats checks if the planID exists in the rootStats collection.
func (*RuntimeStatsColl) GetCopStats ¶
func (e *RuntimeStatsColl) GetCopStats(planID string) *CopRuntimeStats
GetCopStats gets the CopRuntimeStats specified by planID.
func (*RuntimeStatsColl) GetRootStats ¶
func (e *RuntimeStatsColl) GetRootStats(planID string) *RuntimeStats
GetRootStats gets execStat for a executor.
func (*RuntimeStatsColl) RecordOneCopTask ¶
func (e *RuntimeStatsColl) RecordOneCopTask(planID, address string, summary *tipb.ExecutorExecutionSummary)
RecordOneCopTask records a specific cop tasks's execution detail.