MCPcopy
hub / github.com/prometheus/client_golang / Histogram

Interface Histogram

prometheus/histogram.go:249–261  ·  prometheus/histogram.go::Histogram

The nativeHistogramBounds above can be generated with the code below. TODO(beorn7): It's tempting to actually use `go generate` to generate the code above. However, this could lead to slightly different numbers on different architectures. We still need to come to terms if we are fine with that, or

Source from the content-addressed store, hash-verified

247//
248// To create Histogram instances, use NewHistogram.
249type Histogram interface {
250 Metric
251 Collector
252
253 // Observe adds a single observation to the histogram. Observations are
254 // usually positive or zero. Negative observations are accepted but
255 // prevent current versions of Prometheus from properly detecting
256 // counter resets in the sum of observations. (The experimental Native
257 // Histograms handle negative observations properly.) See
258 // https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations
259 // for details.
260 Observe(float64)
261}
262
263// bucketLabel is used for the label that defines the upper bound of a
264// bucket of a histogram ("le" -> "less or equal").

Callers 19

ExampleHistogramFunction · 0.95
benchmarkHistogramWriteFunction · 0.95
TestHistogramConcurrencyFunction · 0.95
TestNativeHistogramFunction · 0.95
TestConstNativeHistogramFunction · 0.95
GetCountIntMethod · 0.95
GetCountFloatMethod · 0.95
WriteMethod · 0.80
GetZeroCountIntMethod · 0.95

Implementers 3

histogramprometheus/histogram.go
summaryprometheus/summary.go
noObjectivesSummaryprometheus/summary.go

Calls

no outgoing calls

Tested by

no test coverage detected