Documentation ¶
Overview ¶
Package histogram provides an histogram interface and a Wavefront histogram implementation (https://docs.wavefront.com/proxies_histograms.html).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Centroid ¶
Centroid encapsulates a mean value and the count of points associated with that value.
type Distribution ¶
Distribution holds the samples and its timestamp.
type Granularity ¶
type Granularity int8
Granularity is the interval (MINUTE, HOUR and/or DAY) by which the histogram data should be aggregated.
const ( MINUTE Granularity = iota HOUR DAY )
func (*Granularity) Duration ¶
func (hg *Granularity) Duration() time.Duration
Duration of the Granularity
func (*Granularity) String ¶
func (hg *Granularity) String() string
type Histogram ¶
type Histogram interface { Update(v float64) Distributions() []Distribution Snapshot() []Distribution Count() uint64 Quantile(q float64) float64 Max() float64 Min() float64 Sum() float64 Mean() float64 Granularity() Granularity }
Histogram a quantile approximation data structure
type Option ¶
type Option func(*histogramImpl)
Option allows histogram customization
func GranularityOption ¶
func GranularityOption(g Granularity) Option
GranularityOption of the histogram
func TimeSupplier ¶ added in v0.9.7
TimeSupplier for the histogram time computations
Click to show internal directories.
Click to hide internal directories.