execdetails

package
v3.1.0-fork Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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"
	// LockKeysTimeStr means the time interval between pessimistic lock wait start and lock got obtain
	LockKeysTimeStr = "LockKeys_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"
	// WaitPrewriteBinlogTimeStr means the time of waiting prewrite binlog finished when transaction committing.
	WaitPrewriteBinlogTimeStr = "Wait_prewrite_binlog_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

View Source
var CommitDetailCtxKey = commitDetailCtxKeyType{}

CommitDetailCtxKey presents CommitDetail info key in context.

Functions

This section is empty.

Types

type CommitDetails

type CommitDetails struct {
	GetCommitTsTime        time.Duration
	PrewriteTime           time.Duration
	WaitPrewriteBinlogTime 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

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

CopRuntimeStats collects cop tasks' execution info.

func (*CopRuntimeStats) GetActRows

func (crs *CopRuntimeStats) GetActRows() (totalRows int64)

GetActRows return total rows of CopRuntimeStats.

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
	LockKeysDuration time.Duration
	BackoffSleep     map[string]time.Duration
	BackoffTimes     map[string]int
	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 ReaderRuntimeStats

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

ReaderRuntimeStats collects stats for TableReader, IndexReader and IndexLookupReader

func (*ReaderRuntimeStats) String

func (rrs *ReaderRuntimeStats) String() string

type RuntimeStats

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

RuntimeStats collects one executor's execution info.

func (*RuntimeStats) GetActRows

func (e *RuntimeStats) GetActRows() int64

GetActRows return rows of CopRuntimeStats.

func (*RuntimeStats) Record

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

Record records executor's execution.

func (*RuntimeStats) SetAdditionalInfo

func (e *RuntimeStats) SetAdditionalInfo(info string)

SetAdditionalInfo sets the additional information.

func (*RuntimeStats) SetConcurrencyInfo

func (e *RuntimeStats) SetConcurrencyInfo(name string, num int)

SetConcurrencyInfo sets the concurrency information. When the num <= 0, it means the exector operator is not executed parallel.

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) GetReaderStats

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

GetReaderStats gets the ReaderRuntimeStats 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.

func (*RuntimeStatsColl) RecordOneReaderStats

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL