package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Packages

# Functions

CreateTestingKnobs creates a testing knob in the unit tests.
InitStmtStatsProcessor initializes & registers a new logstream.Processor for the processing of statement statistics for the tenant associated with the given ctx.
NewStmtStatsAggregator leverages the generic MapReduceAggregator to instantiate and return a new aggregator for StmtStatistic's.

# Variables

DumpStmtStatsToLogBeforeReset specifies whether we dump the statements statistics to logs before being reset.
GatewayNodeEnabled specifies whether we save the gateway node id for each fingerprint during sql stats collection, otherwise the value will be set to 0.
LogicalPlanCollectionPeriod specifies the interval between collections of logical plans for each fingerprint.
MaxMemReportedSampleIndexRecommendations specifies the maximum of unique index recommendations info we store in memory.
MaxMemReportedSQLStatsStmtFingerprints specifies the maximum of unique statement fingerprints we store in memory.
MaxMemReportedSQLStatsTxnFingerprints specifies the maximum of unique transaction fingerprints we store in memory.
MaxMemSQLStatsStmtFingerprints specifies the maximum of unique statement fingerprints we store in memory.
MaxMemSQLStatsTxnFingerprints specifies the maximum of unique transaction fingerprints we store in memory.
MaxSQLStatReset is the cluster setting that controls at what interval SQL statement statistics must be flushed within.
MaxSQLStatsStmtFingerprintsPerExplicitTxn specifies the maximum of unique statement fingerprints we store for each explicit transaction.
SampleIndexRecommendation specifies whether we generate an index recommendation for each fingerprint ID.
SampleLogicalPlans specifies whether we periodically sample the logical plan for each fingerprint.
StatsCollectionLatencyThreshold specifies the minimum amount of time consumed by a SQL statement before it is collected for statistics reporting.
StmtStatsEnable determines whether to collect per-statement statistics.
TxnStatsEnable determines whether to collect per-application transaction statistics.
TxnStatsNumStmtFingerprintIDsToRecord limits the number of statementFingerprintIDs stored in transactions statistics for a single transaction.

# Structs

IteratorOptions provides the ability to the caller to change how it iterates the statements and transactions.
RecordedStmtStats stores the statistics of a statement to be recorded.
RecordedTxnStats stores the statistics of a transaction to be recorded.
SQLStatsLogProcessor is an example logstream.Processor implementation.
TestingKnobs provides hooks and knobs for unit tests.

# Interfaces

ApplicationStats is an interface to read from or write to the statistics belongs to an application.
Provider is a wrapper around sqlstats subsystem for external consumption.
Reader provides methods to retrieve transaction/statement statistics from the Storage.
Storage provides clients with interface to perform read and write operations to sql statistics.
Writer is the interface that provides methods to record statement and transaction stats.

# Type aliases

AggregatedTransactionVisitor is the callback invoked when iterate through transaction statistics collected at the application level using IterateAggregatedTransactionStats().
StatementVisitor is the callback that is invoked when caller iterate through all statement statistics using IterateStatementStats().
TransactionVisitor is the callback that is invoked when caller iterate through all transaction statistics using IterateTransactionStats().