mirror of
https://github.com/prometheus/prometheus.git
synced 2026-02-19 02:29:16 -05:00
Fix incorrect interpolation when counter resets occur in smoothed range selector evaluation. Previously, the asymmetric handling of counter resets (y1=0 on left edge, y2+=y1 on right edge) produced wrong values. Now uniformly set y1=0 when a counter reset is detected, correctly modeling the counter as starting from 0 post-reset. This fixes rate calculations across counter resets. For example, rate(metric[10s] smoothed) where metric goes from 100 to 10 (a reset) now correctly computes 0.666... by treating the counter as resetting to 0 rather than producing inflated values from the old behavior. Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| fuzz-data | ||
| parser | ||
| promqltest | ||
| bench_test.go | ||
| durations.go | ||
| durations_test.go | ||
| engine.go | ||
| engine_internal_test.go | ||
| engine_test.go | ||
| functions.go | ||
| functions_internal_test.go | ||
| functions_test.go | ||
| fuzz.go | ||
| fuzz_test.go | ||
| histogram_stats_iterator.go | ||
| histogram_stats_iterator_test.go | ||
| info.go | ||
| promql_test.go | ||
| quantile.go | ||
| quantile_test.go | ||
| query_logger.go | ||
| query_logger_test.go | ||
| value.go | ||
| value_test.go | ||