Documentation ¶
Index ¶
- type CPUUsages
- type SQLCPUUsages
- func (c *SQLCPUUsages) AllocNewSQLID() uint64
- func (c *SQLCPUUsages) GetCPUUsages() CPUUsages
- func (c *SQLCPUUsages) MergeTidbCPUTime(sqlID uint64, d time.Duration)
- func (c *SQLCPUUsages) MergeTikvCPUTime(d time.Duration)
- func (c *SQLCPUUsages) ResetCPUTimes()
- func (c *SQLCPUUsages) SetCPUUsages(usage CPUUsages)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLCPUUsages ¶
SQLCPUUsages is used to record sqlID and its cpu usages
func (*SQLCPUUsages) AllocNewSQLID ¶
func (c *SQLCPUUsages) AllocNewSQLID() uint64
AllocNewSQLID alloc new ID, will restart from 0 when exceeds uint64 max limit
func (*SQLCPUUsages) GetCPUUsages ¶
func (c *SQLCPUUsages) GetCPUUsages() CPUUsages
GetCPUUsages returns tidbCPU, tikvCPU time
func (*SQLCPUUsages) MergeTidbCPUTime ¶
func (c *SQLCPUUsages) MergeTidbCPUTime(sqlID uint64, d time.Duration)
MergeTidbCPUTime merges tidbCPU time into self when sqlID matches Checks sqlID here, because tidb cpu time can only be collected by profiler now, and updated in concurrent goroutines
func (*SQLCPUUsages) MergeTikvCPUTime ¶
func (c *SQLCPUUsages) MergeTikvCPUTime(d time.Duration)
MergeTikvCPUTime merges tikvCPU time into self. Doesn't need to check sqlID here, because tikv cpu time is updated in executors now.
func (*SQLCPUUsages) ResetCPUTimes ¶
func (c *SQLCPUUsages) ResetCPUTimes()
ResetCPUTimes resets tidb/tikv cpu times to 0
func (*SQLCPUUsages) SetCPUUsages ¶
func (c *SQLCPUUsages) SetCPUUsages(usage CPUUsages)
SetCPUUsages sets cpu usages value
Click to show internal directories.
Click to hide internal directories.