Documentation ¶
Index ¶
- func GetHistogramMetricBase(m labels.Labels, suffix string) labels.Labels
- func GetHistogramMetricBaseName(s string) string
- func NewHistogram(histogram TempHistogram, upperBounds []float64, hBase *histogram.Histogram, ...) (*histogram.Histogram, *histogram.FloatHistogram)
- func ProcessUpperBoundsAndCreateBaseHistogram(upperBounds0 []float64, needsDedup bool) ([]float64, *histogram.Histogram)
- type TempHistogram
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHistogramMetricBase ¶
func GetHistogramMetricBaseName ¶
GetHistogramMetricBaseName removes the suffixes _bucket, _sum, _count from the metric name. We specifically do not remove the _created suffix as that should be removed by the caller.
func NewHistogram ¶
func NewHistogram(histogram TempHistogram, upperBounds []float64, hBase *histogram.Histogram, fhBase *histogram.FloatHistogram) (*histogram.Histogram, *histogram.FloatHistogram)
NewHistogram fills the bucket counts in the provided histogram.Histogram or histogram.FloatHistogram based on the provided temporary histogram and upper bounds.
func ProcessUpperBoundsAndCreateBaseHistogram ¶
func ProcessUpperBoundsAndCreateBaseHistogram(upperBounds0 []float64, needsDedup bool) ([]float64, *histogram.Histogram)
ProcessUpperBoundsAndCreateBaseHistogram prepares an integer native histogram with custom buckets based on the provided upper bounds. Everything is set except the bucket counts. The sorted upper bounds are also returned.
Types ¶
type TempHistogram ¶
type TempHistogram struct { BucketCounts map[float64]float64 Count float64 Sum float64 HasFloat bool }
TempHistogram is used to collect information about classic histogram samples incrementally before creating a histogram.Histogram or histogram.FloatHistogram based on the values collected.
func NewTempHistogram ¶
func NewTempHistogram() TempHistogram
NewTempHistogram creates a new TempHistogram to collect information about classic histogram samples.