Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefTiDBTopSQLEnable = false DefTiDBTopSQLPrecisionSeconds = 1 DefTiDBTopSQLMaxTimeSeriesCount = 100 DefTiDBTopSQLMaxMetaCount = 5000 DefTiDBTopSQLReportIntervalSeconds = 60 )
Default Top-SQL state values.
Variables ¶
View Source
var GlobalState = State{ PrecisionSeconds: atomic.NewInt64(DefTiDBTopSQLPrecisionSeconds), MaxStatementCount: atomic.NewInt64(DefTiDBTopSQLMaxTimeSeriesCount), MaxCollect: atomic.NewInt64(DefTiDBTopSQLMaxMetaCount), ReportIntervalSeconds: atomic.NewInt64(DefTiDBTopSQLReportIntervalSeconds), // contains filtered or unexported fields }
GlobalState is the global Top-SQL state.
Functions ¶
func TopSQLEnabled ¶
func TopSQLEnabled() bool
TopSQLEnabled uses to check whether enabled the top SQL feature.
Types ¶
type State ¶
type State struct { // The refresh interval of top-sql. PrecisionSeconds *atomic.Int64 // The maximum number of statements kept in memory. MaxStatementCount *atomic.Int64 // The maximum capacity of the collect map. MaxCollect *atomic.Int64 // The report data interval of top-sql. ReportIntervalSeconds *atomic.Int64 // contains filtered or unexported fields }
State is the state for control top sql feature.
Click to show internal directories.
Click to hide internal directories.