tidb: github.com/pingcap/tidb/util/execdetails Index | Files

package execdetails

import "github.com/pingcap/tidb/util/execdetails"

Index

Package Files

execdetails.go

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"
    // PreWriteTimeStr means the time of pre-write.
    PreWriteTimeStr = "Prewrite_time"
    // CommitTimeStr means the time of commit.
    CommitTimeStr = "Commit_time"
    // GetCommitTSTimeStr means the time of getting commit ts.
    GetCommitTSTimeStr = "Get_commit_ts_time"
    // CommitBackoffTimeStr means the time of commit backoff.
    CommitBackoffTimeStr = "Commit_backoff_time"
    // BackoffTypesStr means the backoff type.
    BackoffTypesStr = "Backoff_types"
    // ResolveLockTimeStr means the time of resolving lock.
    ResolveLockTimeStr = "Resolve_lock_time"
    // LocalLatchWaitTimeStr means the time of waiting in local latch.
    LocalLatchWaitTimeStr = "Local_latch_wait_time"
    // WriteKeysStr means the count of keys in the transaction.
    WriteKeysStr = "Write_keys"
    // WriteSizeStr means the key/value size in the transaction.
    WriteSizeStr = "Write_size"
    // PrewriteRegionStr means the count of region when pre-write.
    PrewriteRegionStr = "Prewrite_region"
    // TxnRetryStr means the count of transaction retry.
    TxnRetryStr = "Txn_retry"
)

Variables

var CommitDetailCtxKey = commitDetailCtxKeyType{}

CommitDetailCtxKey presents CommitDetail info key in context.

type CommitDetails Uses

type CommitDetails struct {
    GetCommitTsTime   time.Duration
    PrewriteTime      time.Duration
    CommitTime        time.Duration
    LocalLatchTime    time.Duration
    CommitBackoffTime int64
    Mu                struct {
        sync.Mutex
        BackoffTypes []fmt.Stringer
    }
    ResolveLockTime   int64
    WriteKeys         int
    WriteSize         int
    PrewriteRegionNum int32
    TxnRetry          int
}

CommitDetails contains commit detail information.

type CopRuntimeStats Uses

type CopRuntimeStats struct {
    sync.Mutex
    // contains filtered or unexported fields
}

CopRuntimeStats collects cop tasks' execution info.

func (*CopRuntimeStats) RecordOneCopTask Uses

func (crs *CopRuntimeStats) RecordOneCopTask(address string, summary *tipb.ExecutorExecutionSummary)

RecordOneCopTask records a specific cop tasks's execution detail.

func (*CopRuntimeStats) String Uses

func (crs *CopRuntimeStats) String() string

type ExecDetails Uses

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 Uses

func (d ExecDetails) String() string

String implements the fmt.Stringer interface.

func (ExecDetails) ToZapFields Uses

func (d ExecDetails) ToZapFields() (fields []zap.Field)

ToZapFields wraps the ExecDetails as zap.Fields.

type ReaderRuntimeStats Uses

type ReaderRuntimeStats struct {
    sync.Mutex
    // contains filtered or unexported fields
}

ReaderRuntimeStats collects stats for TableReader, IndexReader and IndexLookupReader

func (*ReaderRuntimeStats) String Uses

func (rrs *ReaderRuntimeStats) String() string

type RuntimeStats Uses

type RuntimeStats struct {
    // contains filtered or unexported fields
}

RuntimeStats collects one executor's execution info.

func (*RuntimeStats) Record Uses

func (e *RuntimeStats) Record(d time.Duration, rowNum int)

Record records executor's execution.

func (*RuntimeStats) SetRowNum Uses

func (e *RuntimeStats) SetRowNum(rowNum int64)

SetRowNum sets the row num.

func (*RuntimeStats) String Uses

func (e *RuntimeStats) String() string

type RuntimeStatsColl Uses

type RuntimeStatsColl struct {
    // contains filtered or unexported fields
}

RuntimeStatsColl collects executors's execution info.

func NewRuntimeStatsColl Uses

func NewRuntimeStatsColl() *RuntimeStatsColl

NewRuntimeStatsColl creates new executor collector.

func (*RuntimeStatsColl) ExistsCopStats Uses

func (e *RuntimeStatsColl) ExistsCopStats(planID string) bool

ExistsCopStats checks if the planID exists in the copStats collection.

func (*RuntimeStatsColl) ExistsRootStats Uses

func (e *RuntimeStatsColl) ExistsRootStats(planID string) bool

ExistsRootStats checks if the planID exists in the rootStats collection.

func (*RuntimeStatsColl) GetCopStats Uses

func (e *RuntimeStatsColl) GetCopStats(planID string) *CopRuntimeStats

GetCopStats gets the CopRuntimeStats specified by planID.

func (*RuntimeStatsColl) GetReaderStats Uses

func (e *RuntimeStatsColl) GetReaderStats(planID string) *ReaderRuntimeStats

GetReaderStats gets the ReaderRuntimeStats specified by planID.

func (*RuntimeStatsColl) GetRootStats Uses

func (e *RuntimeStatsColl) GetRootStats(planID string) *RuntimeStats

GetRootStats gets execStat for a executor.

func (*RuntimeStatsColl) RecordOneCopTask Uses

func (e *RuntimeStatsColl) RecordOneCopTask(planID, address string, summary *tipb.ExecutorExecutionSummary)

RecordOneCopTask records a specific cop tasks's execution detail.

func (*RuntimeStatsColl) RecordOneReaderStats Uses

func (e *RuntimeStatsColl) RecordOneReaderStats(planID string, copRespTime time.Duration)

RecordOneReaderStats records a specific stats for TableReader, IndexReader and IndexLookupReader.

Package execdetails imports 9 packages (graph) and is imported by 38 packages. Updated 2019-11-12. Refresh now. Tools for package owners.