Documentation ¶
Index ¶
- Constants
- 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 SetupTopSQL()
- func SetupTopSQLForTest(r reporter.TopSQLReporter)
Constants ¶
View Source
const ( // MaxSQLTextSize exports for testing. MaxSQLTextSize = 4 * 1024 // MaxBinaryPlanSize exports for testing. MaxBinaryPlanSize = 2 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func AttachAndRegisterSQLInfo ¶
func AttachAndRegisterSQLInfo(ctx context.Context, normalizedSQL string, sqlDigest *parser.Digest, isInternal bool) context.Context
AttachAndRegisterSQLInfo attach the sql information into Top SQL 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 SQL
func MockHighCPULoad ¶
MockHighCPULoad mocks high cpu load, only use in failpoint test.
func RegisterPlan ¶
RegisterPlan uses to register plan information into Top SQL.
func RegisterPubSubServer ¶
RegisterPubSubServer registers TopSQLPubSubService to the given gRPC server.
func RegisterSQL ¶
RegisterSQL uses to register SQL information into Top SQL.
func SetupTopSQLForTest ¶
func SetupTopSQLForTest(r reporter.TopSQLReporter)
SetupTopSQLForTest sets up the global top-sql reporter, it's exporting for test.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.