queryresponsetime

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN = "query.response-time"

	OPT_REAL_PERCENTILES = "real-percentiles"
	OPT_TRUNCATE_TABLE   = "truncate-table"
	OPT_TRUNCATE_TIMEOUT = "truncate-timeout"

	ERR_NO_TABLE        = "table-not-exist"
	ERR_TRUNCATE_FAILED = "truncate-timeout"

	BASE_QUERY     = "" /* 147-byte string literal not displayed */
	TRUNCATE_QUERY = "TRUNCATE TABLE performance_schema.events_statements_histogram_global"
	LOCKWAIT_QUERY = "SET @@session.lock_wait_timeout=%d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseTime

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

func NewResponseTime

func NewResponseTime(db *sql.DB) *ResponseTime

func (*ResponseTime) Collect

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

Collect collects metrics at the given level.

func (*ResponseTime) Domain

func (c *ResponseTime) Domain() string

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

func (*ResponseTime) Help

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

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

func (*ResponseTime) Prepare

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