trx

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN           = "trx"
	OLDEST_TRX_QUERY = `SELECT COALESCE(UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(MIN(trx_started)), 0) t FROM information_schema.innodb_trx;`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Trx

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

Trx collects metrics for the event.trx domain. The source is information_schema.innodb_trx.

func NewTrx

func NewTrx(db *sql.DB) *Trx

NewTrx makes a new Trx collector.

func (*Trx) Collect

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

Collect collects metrics at the given level.

func (*Trx) Domain

func (c *Trx) Domain() string

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

func (*Trx) Help

func (c *Trx) Help() blip.CollectorHelp

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

func (*Trx) Prepare

func (c *Trx) 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