convertnhcb

package
v0.300.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHistogramMetricBase

func GetHistogramMetricBase(m labels.Labels, suffix string) labels.Labels

func GetHistogramMetricBaseName

func GetHistogramMetricBaseName(s string) string

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.

Jump to

Keyboard shortcuts

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