mock

package
v1.1.0-beta.0...-bd07e09 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenSQLDigest

func GenSQLDigest(sql string) *parser.Digest

GenSQLDigest uses for testing.

Types

type TopSQLCollector

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

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

func (*TopSQLCollector) Close()

Close implements the interface.

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

func (c *TopSQLCollector) Reset()

Reset cleans all collected data.

func (*TopSQLCollector) Start

func (*TopSQLCollector) Start()

Start implements TopSQLReporter interface.

func (*TopSQLCollector) WaitCollectCnt

func (c *TopSQLCollector) WaitCollectCnt(count int64)

WaitCollectCnt uses for testing.

Jump to

Keyboard shortcuts

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