percona

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

Documentation

Index

Constants

View Source
const (
	OPT_REAL_PERCENTILES = "real-percentiles"
	OPT_FLUSH_QRT        = "flush"

	ERR_UNKNOWN_TABLE = "unknown-table"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type QRT

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

func NewQRT

func NewQRT(db *sql.DB) *QRT

func (*QRT) Collect

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

Collect Collects query response time metrics for a particular level

func (*QRT) Domain

func (c *QRT) Domain() string

func (*QRT) Help

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

func (*QRT) Prepare

func (c *QRT) Prepare(ctx context.Context, plan blip.Plan) (func(), error)

Prepare Prepares options for all levels in the plan that contain the percona.response-time domain

type QRTBucket

type QRTBucket struct {
	Time  float64
	Count uint64
	Total float64
}

QRTBucket : https://www.percona.com/doc/percona-server/5.6/diagnostics/response_time_distribution.html Represents a row from information_schema.Query_Response_Time

type QRTHistogram

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

QRTHistogram represents a histogram containing MySQLQRTBuckets. Where each bucket is a bin.

func NewQRTHistogram

func NewQRTHistogram(buckets []QRTBucket) QRTHistogram

func (QRTHistogram) Percentile

func (h QRTHistogram) Percentile(p float64) (value float64, actualPercentile float64)

Percentile for QRTHistogram p should be p/100 where p is requested percentile (example: 0.10 for 10th percentile) Percentile is defined as the weighted of the percentiles of the lowest bin that is greater than the requested percentile rank it returns the percentile value and the real percentile used

Jump to

Keyboard shortcuts

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