waitiotable

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN = "wait.io.table"

	OPT_EXCLUDE          = "exclude"
	OPT_INCLUDE          = "include"
	OPT_TRUNCATE_TABLE   = "truncate-table"
	OPT_TRUNCATE_TIMEOUT = "truncate-timeout"
	OPT_ALL              = "all"

	OPT_EXCLUDE_DEFAULT = "mysql.*,information_schema.*,performance_schema.*,sys.*"

	TRUNCATE_QUERY = "TRUNCATE TABLE performance_schema.table_io_waits_summary_by_table"

	ERR_TRUNCATE_FAILED = "truncate-timeout"
	LOCKWAIT_QUERY      = "SET @@session.lock_wait_timeout=%d"
)

Variables

This section is empty.

Functions

func TableIoWaitQuery

func TableIoWaitQuery(set map[string]string, metrics []string) string

Types

type Table

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

Table collects table io for domain wait.io.table.

func NewTable

func NewTable(db *sql.DB) *Table

NewTable makes a new Table collector,

func (*Table) Collect

func (t *Table) Collect(ctx context.Context, levelName string) ([]blip.MetricValue, error)

func (*Table) Domain

func (t *Table) Domain() string

Domain returns the Blip metric domain name (DOMAIN const).

func (*Table) Help

func (t *Table) Help() blip.CollectorHelp

Help returns the output for blip --print-domains.

func (*Table) Prepare

func (t *Table) Prepare(ctx context.Context, plan blip.Plan) (func(), error)

Prepare prepares the collector for the given plan.

Jump to

Keyboard shortcuts

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