perfschema

package
v1.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2015 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDigestRows

func GetDigestRows(mysqlConn mysql.Connector, c chan<- *DigestRow, doneChan chan<- error) error

func GetDigestText

func GetDigestText(mysqlConn mysql.Connector, digest string) (string, error)

Types

type Class

type Class struct {
	DigestText string
	Rows       map[string]*DigestRow // keyed on schema
}

A Class represents a single query and its per-schema instances.

type DigestRow

type DigestRow struct {
	Schema                  string
	Digest                  string
	CountStar               uint64
	SumTimerWait            uint64
	MinTimerWait            uint64
	AvgTimerWait            uint64
	MaxTimerWait            uint64
	SumLockTime             uint64
	SumErrors               uint64
	SumWarnings             uint64
	SumRowsAffected         uint64
	SumRowsSent             uint64
	SumRowsExamined         uint64
	SumCreatedTmpDiskTables uint // bool in slow log
	SumCreatedTmpTables     uint // bool in slow log
	SumSelectFullJoin       uint // bool in slow log
	SumSelectFullRangeJoin  uint64
	SumSelectRange          uint64
	SumSelectRangeCheck     uint64
	SumSelectScan           uint // 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 GetDigestRowsFunc

type GetDigestRowsFunc func(c chan<- *DigestRow, doneChan chan<- error) error

type GetDigestTextFunc

type GetDigestTextFunc func(string) (string, error)

type Iter

type Iter struct {
	// contains filtered or unexported fields
}

func NewIter

func NewIter(logger *pct.Logger, tickChan chan time.Time) *Iter

func (*Iter) IntervalChan

func (i *Iter) IntervalChan() chan *qan.Interval

func (*Iter) Start

func (i *Iter) Start()

func (*Iter) Stop

func (i *Iter) Stop()

func (*Iter) TickChan

func (i *Iter) TickChan() chan time.Time

type RealWorkerFactory

type RealWorkerFactory struct {
	// contains filtered or unexported fields
}

func NewRealWorkerFactory

func NewRealWorkerFactory(logChan chan *proto.LogEntry) *RealWorkerFactory

func (*RealWorkerFactory) Make

func (f *RealWorkerFactory) Make(name string, mysqlConn mysql.Connector) *Worker

type Snapshot

type Snapshot map[string]Class // keyed on digest (classId)

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 qan.Result.

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(logger *pct.Logger, mysqlConn mysql.Connector, getRows GetDigestRowsFunc, getText GetDigestTextFunc) *Worker

func (*Worker) Cleanup

func (w *Worker) Cleanup() error

func (*Worker) Run

func (w *Worker) Run() (*qan.Result, error)

func (*Worker) Setup

func (w *Worker) Setup(interval *qan.Interval) error

func (*Worker) Status

func (w *Worker) Status() map[string]string

func (*Worker) Stop

func (w *Worker) Stop() error

type WorkerFactory

type WorkerFactory interface {
	Make(name string, mysqlConn mysql.Connector) *Worker
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL