Documentation
¶
Overview ¶
Package metrics contains some common utility functions for constructing performance-monitoring metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LatencyBuckets is a default collection of histogram buckets // for latency metrics. The values in this slice assume that the // metric's base units are measured in seconds. LatencyBuckets = Buckets(time.Millisecond.Seconds(), time.Minute.Seconds()) // SchemaLabels are the labels to be applied to single-schema vector // metrics. SchemaLabels = []string{schemaLabel} // TableLabels are the labels to be applied to table-specific, // vector metrics. TableLabels = []string{schemaLabel, tableLabel} )
Functions ¶
func Buckets ¶
Buckets computes a linear log10 sequence of buckets, starting from the base unit, up to the specified maximum.
func SchemaValues ¶
SchemaValues returns the values to plug into a vector metric that expects SchemaLabels.
func TableValues ¶
TableValues returns the values to plug into a vector metric that expects TableLabels.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.