Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDigestRows ¶
func GetDigestRows(mysqlConn mysql.Connector, lastFetchSeconds float64, c chan<- *DigestRow, doneChan chan<- error) error
GetDigestRows connects to MySQL through `mysql.Connector`, fetches snapshot of data from events_statements_summary_by_digest, delivers it over a channel, and notifies success or error through `doneChan`. If `lastFetchSeconds` equals `-1` then it fetches all data, not just since `lastFetchSeconds`.
Types ¶
type DigestRow ¶
type DigestRow struct { Schema string Digest string DigestText string CountStar uint SumTimerWait uint64 MinTimerWait uint64 AvgTimerWait uint64 MaxTimerWait uint64 SumLockTime uint64 SumErrors uint64 SumWarnings uint64 SumRowsAffected uint64 SumRowsSent uint64 SumRowsExamined uint64 SumCreatedTmpDiskTables uint64 // bool in slow log SumCreatedTmpTables uint64 // bool in slow log SumSelectFullJoin uint64 // bool in slow log SumSelectFullRangeJoin uint64 SumSelectRange uint64 SumSelectRangeCheck uint64 SumSelectScan uint64 // bool in slow log SumSortMergePasses uint64 SumSortRange uint64 SumSortRows uint64 SumSortScan uint64 SumNoIndexUsed uint64 SumNoGoodIndexUsed uint64 }
A DigestRow is a row from performance_schema.events_statements_summary_by_digest.
type Digests ¶
type Digests struct { // All digests collected from performance_schema since creation of Digests or Reset() All Snapshot // Curr digests collected from performance_schema Curr Snapshot }
Digests represents digests retrieved from performance_schema
type GetDigestRowsFunc ¶
type Iter ¶
type Iter struct {
// contains filtered or unexported fields
}
func (*Iter) IntervalChan ¶
type RealWorkerFactory ¶
type RealWorkerFactory struct {
// contains filtered or unexported fields
}
func NewRealWorkerFactory ¶
func NewRealWorkerFactory(logChan chan proto.LogEntry) *RealWorkerFactory
type Snapshot ¶
A Snapshot represents all rows from performance_schema.events_statements_summary_by_digest at a single time, grouped by digest into classes. Two consecutive Snapshots are needed to produce a mysqlAnalyzer.Result.