package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev
# Functions
CloseAggregator is used to stop the background aggregator goroutine of the stmtstats module.
CreateStatementStats try to create and register an StatementStats.
NewKvStatementStatsItem creates an empty KvStatementStatsItem.
NewStatementStatsItem creates an empty StatementStatsItem.
RegisterCollector binds a Collector to globalAggregator.
SetupAggregator is used to initialize the background aggregator goroutine of the stmtstats module.
UnregisterCollector removes Collector from globalAggregator.
# Structs
KvExecCounter is used to count the number of SQL executions of the kv layer.
KvStatementStatsItem is part of StatementStatsItem, it only contains indicators of kv layer.
SQLPlanDigest is used as the key of StatementStatsMap to distinguish different sql.
StatementStats is a counter used locally in each session.
StatementStatsItem represents a set of mergeable statistics.
# Interfaces
Collector is used to collect StatementStatsMap.
StatementObserver is an abstract interface as a callback to the corresponding position of TiDB's SQL statement execution process.
# Type aliases
BinaryDigest is converted from parser.Digest.Bytes(), and the purpose is to be used as the key of the map.
StatementStatsMap is the local data type of StatementStats.