mirror of
https://github.com/prometheus/prometheus.git
synced 2026-02-03 20:39:32 -05:00
This commit implements counter reset hint comparison in the promqltest framework to address issue #17615. Previously, while test definitions could specify a counter_reset_hint in expected native histogram results, the framework did not actually compare this hint between expected and actual results. The implementation adds optional comparison logic to the compareNativeHistogram function: - If the expected histogram has UnknownCounterReset (the default), the hint is not compared (meaning "don't care") - If the expected histogram explicitly specifies CounterReset, NotCounterReset, or GaugeType, it is verified against the actual histogram's hint This allows tests to verify that PromQL functions correctly set or preserve counter reset hints while maintaining backward compatibility with existing tests that don't specify explicit hints. Fixes #17615 Signed-off-by: aviralgarg05 <gargaviral99@gmail.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 | ||