Documentation ¶
Index ¶
- func GenSQLDigest(sql string) *parser.Digest
- type TopSQLCollector
- func (*TopSQLCollector) BindProcessCPUTimeUpdater(_ collector.ProcessCPUTimeUpdater)
- func (*TopSQLCollector) Close()
- func (c *TopSQLCollector) Collect(stats []collector.SQLCPUTimeRecord)
- func (c *TopSQLCollector) CollectCnt() int64
- func (*TopSQLCollector) CollectStmtStatsMap(_ stmtstats.StatementStatsMap)
- func (c *TopSQLCollector) GetPlan(planDigest []byte) string
- func (c *TopSQLCollector) GetSQL(sqlDigest []byte) string
- func (c *TopSQLCollector) GetSQLCPUTimeBySQL(sql string) uint32
- func (c *TopSQLCollector) GetSQLStatsBySQL(sql string, planIsNotNull bool) []*collector.SQLCPUTimeRecord
- func (c *TopSQLCollector) GetSQLStatsBySQLWithRetry(sql string, planIsNotNull bool) []*collector.SQLCPUTimeRecord
- func (c *TopSQLCollector) RegisterPlan(planDigest []byte, normalizedPlan string, isLarge bool)
- func (c *TopSQLCollector) RegisterSQL(sqlDigest []byte, normalizedSQL string, _ bool)
- func (c *TopSQLCollector) Reset()
- func (*TopSQLCollector) Start()
- func (c *TopSQLCollector) WaitCollectCnt(count int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TopSQLCollector ¶
TopSQLCollector uses for testing.
func NewTopSQLCollector ¶
func NewTopSQLCollector() *TopSQLCollector
NewTopSQLCollector uses for testing.
func (*TopSQLCollector) BindProcessCPUTimeUpdater ¶
func (*TopSQLCollector) BindProcessCPUTimeUpdater(_ collector.ProcessCPUTimeUpdater)
BindProcessCPUTimeUpdater implements TopSQLReporter.
func (*TopSQLCollector) Collect ¶
func (c *TopSQLCollector) Collect(stats []collector.SQLCPUTimeRecord)
Collect uses for testing.
func (*TopSQLCollector) CollectCnt ¶
func (c *TopSQLCollector) CollectCnt() int64
CollectCnt uses for testing.
func (*TopSQLCollector) CollectStmtStatsMap ¶
func (*TopSQLCollector) CollectStmtStatsMap(_ stmtstats.StatementStatsMap)
CollectStmtStatsMap implements stmtstats.Collector.
func (*TopSQLCollector) GetPlan ¶
func (c *TopSQLCollector) GetPlan(planDigest []byte) string
GetPlan uses for testing.
func (*TopSQLCollector) GetSQL ¶
func (c *TopSQLCollector) GetSQL(sqlDigest []byte) string
GetSQL uses for testing.
func (*TopSQLCollector) GetSQLCPUTimeBySQL ¶
func (c *TopSQLCollector) GetSQLCPUTimeBySQL(sql string) uint32
GetSQLCPUTimeBySQL uses for testing.
func (*TopSQLCollector) GetSQLStatsBySQL ¶
func (c *TopSQLCollector) GetSQLStatsBySQL(sql string, planIsNotNull bool) []*collector.SQLCPUTimeRecord
GetSQLStatsBySQL uses for testing.
func (*TopSQLCollector) GetSQLStatsBySQLWithRetry ¶
func (c *TopSQLCollector) GetSQLStatsBySQLWithRetry(sql string, planIsNotNull bool) []*collector.SQLCPUTimeRecord
GetSQLStatsBySQLWithRetry uses for testing.
func (*TopSQLCollector) RegisterPlan ¶
func (c *TopSQLCollector) RegisterPlan(planDigest []byte, normalizedPlan string, isLarge bool)
RegisterPlan uses for testing.
func (*TopSQLCollector) RegisterSQL ¶
func (c *TopSQLCollector) RegisterSQL(sqlDigest []byte, normalizedSQL string, _ bool)
RegisterSQL uses for testing.
func (*TopSQLCollector) Start ¶
func (*TopSQLCollector) Start()
Start implements TopSQLReporter interface.
func (*TopSQLCollector) WaitCollectCnt ¶
func (c *TopSQLCollector) WaitCollectCnt(count int64)
WaitCollectCnt uses for testing.
Click to show internal directories.
Click to hide internal directories.