mirror of
https://github.com/floci-io/floci.git
synced 2026-12-02 17:58:05 -05:00
rate, increase and delta of a histogram's range follow Prometheus v3.16's histogramRate: the last histogram at the range's coarsest schema less the first, each histogram before a counter reset added back for a counter (the first taken as empty when the second follows a reset), then extrapolated with the float path's factor, the count standing in for the value. A counter reset is detected as FloatHistogram.DetectReset detects one: a fall in the count, the zero bucket or any bucket at the newer schema above the zero threshold, a finer schema or a smaller zero threshold. irate and idelta take the last two samples of either kind, resets and changes count floats and histograms in time order, and a range of both kinds has no rate with Prometheus's mixed-samples warning. Histograms keep no counter reset hint, as the guide says rate treats every histogram alike, so delta and idelta of histograms give Prometheus's "this native histogram metric is not a gauge" warning. Part of #7030.