Skip to main content

Module classic

Module classic 

Source
Expand description

Prometheus BucketQuantile and BucketFraction over the buckets of a classic histogram at one point.

Structsยง

Bucket ๐Ÿ”’

Constantsยง

SMALL_DELTA_TOLERANCE ๐Ÿ”’
Relative difference under which neighbouring bucket counts are taken as equal.

Functionsยง

almost_equal ๐Ÿ”’
Prometheus almost.Equal.
bucket_fraction ๐Ÿ”’
Prometheus BucketFraction over buckets sorted by upper bound.
bucket_quantile ๐Ÿ”’
Prometheus BucketQuantile over buckets sorted by upper bound.
coalesce ๐Ÿ”’
Merges buckets with the same upper bound.
ensure_monotonic ๐Ÿ”’
Prometheus ensureMonotonicAndIgnoreSmallDeltas: counts that differ from the previous one by a negligible relative amount, or are lower, are raised to it.
go_search ๐Ÿ”’
Goโ€™s sort.Search: the smallest index in [0, n) where f holds, or n, found by the same bisection, so a predicate that is not monotonic (NaN counts) picks the same index.
parse_bound ๐Ÿ”’
Goโ€™s strconv.ParseFloat, which rejects finite literals out of the f64 range and a signed NaN, and accepts _ between digits. Hexadecimal literals are not supported.
underscores_ok ๐Ÿ”’
Goโ€™s strconv.underscoreOK for a decimal literal: every _ sits between two digits.