Documentation
¶
Index ¶
- Constants
- func AttachAndRegisterProcessInfo(ctx context.Context, connID uint64, sqlID uint64) context.Context
- func AttachAndRegisterSQLInfo(ctx context.Context, normalizedSQL string, sqlDigest *parser.Digest, ...) context.Context
- func AttachSQLAndPlanInfo(ctx context.Context, sqlDigest *parser.Digest, planDigest *parser.Digest) context.Context
- func Close()
- func MockHighCPULoad(sql string, sqlPrefixs []string, load int64) bool
- func RegisterPlan(normalizedPlan string, planDigest *parser.Digest)
- func RegisterPubSubServer(s *grpc.Server)
- func RegisterSQL(normalizedSQL string, sqlDigest *parser.Digest, isInternal bool)
- func SetupTopProfiling(keyspaceName []byte, updater collector.ProcessCPUTimeUpdater)
- func SetupTopProfilingForTest(r reporter.TopSQLReporter)
Constants ¶
const ( // MaxSQLTextSize exports for testing. MaxSQLTextSize = 4 * 1024 // MaxBinaryPlanSize exports for testing. MaxBinaryPlanSize = 2 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func AttachAndRegisterProcessInfo ¶
AttachAndRegisterProcessInfo attach the ProcessInfo into Goroutine labels.
func AttachAndRegisterSQLInfo ¶
func AttachAndRegisterSQLInfo(ctx context.Context, normalizedSQL string, sqlDigest *parser.Digest, isInternal bool) context.Context
AttachAndRegisterSQLInfo attach the sql information into Top Profiling and register the SQL meta information.
func AttachSQLAndPlanInfo ¶
func AttachSQLAndPlanInfo(ctx context.Context, sqlDigest *parser.Digest, planDigest *parser.Digest) context.Context
AttachSQLAndPlanInfo attach the sql and plan information into Top Profiling.
func MockHighCPULoad ¶
MockHighCPULoad mocks high cpu load, only use in failpoint test.
func RegisterPlan ¶
RegisterPlan uses to register plan information into Top Profiling.
func RegisterPubSubServer ¶
RegisterPubSubServer registers TopSQLPubSubService to the given gRPC server.
func RegisterSQL ¶
RegisterSQL uses to register SQL information into Top Profiling.
func SetupTopProfiling ¶
func SetupTopProfiling(keyspaceName []byte, updater collector.ProcessCPUTimeUpdater)
SetupTopProfiling sets up the Top Profiling pipeline.
NOTE: Despite the legacy package name, this initializer wires the collectors and reporters shared by TopSQL (and future TopRU).
func SetupTopProfilingForTest ¶
func SetupTopProfilingForTest(r reporter.TopSQLReporter)
SetupTopProfilingForTest sets up the global reporter for tests.
Types ¶
This section is empty.