Documentation ¶
Overview ¶
Package metrics defines metrics utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistogramBucket ¶
type HistogramBucket struct { Scale string `json:"scale"` LowerBound float64 `json:"lower-bound"` UpperBound float64 `json:"upper-bound"` Count uint64 `json:"count"` }
HistogramBucket represents metrics latency bucket.
func (HistogramBucket) String ¶
func (bucket HistogramBucket) String() string
type HistogramBuckets ¶
type HistogramBuckets []HistogramBucket
func MergeHistograms ¶
func MergeHistograms(a HistogramBuckets, b HistogramBuckets) (HistogramBuckets, error)
MergeHistograms merges two histograms.
func ParseHistogram ¶
func ParseHistogram(scale string, histo *dto.Histogram) (buckets HistogramBuckets, err error)
ParseHistogram parses Prometheus histogram.
func (HistogramBuckets) Len ¶
func (buckets HistogramBuckets) Len() int
func (HistogramBuckets) Less ¶
func (buckets HistogramBuckets) Less(i, j int) bool
func (HistogramBuckets) Swap ¶
func (buckets HistogramBuckets) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.