mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
test(promql): abs function on native histograms
abs() function silently ignores native histograms. Ref: https://github.com/prometheus/prometheus/pull/15845 Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
This commit is contained in:
parent
665d1ba0cc
commit
50739530bb
|
@ -998,6 +998,26 @@ eval instant at 10m histogram_sum(increase(reset_in_bucket[15m]))
|
|||
|
||||
clear
|
||||
|
||||
# Test that abs() silently ignores native histograms
|
||||
load 5m
|
||||
multi_histogram {{schema:0 sum:5 count:4 buckets:[1 2 1]}}x10
|
||||
|
||||
eval instant at 10m abs(histogram_count(multi_histogram))
|
||||
{} 4
|
||||
|
||||
eval range from 9m to 10m step 1m abs(histogram_count(multi_histogram))
|
||||
{} 4 4
|
||||
|
||||
eval instant at 10m abs(multi_histogram)
|
||||
|
||||
eval range from 9m to 10m step 1m abs(multi_histogram)
|
||||
|
||||
eval instant at 10m histogram_count(abs(multi_histogram))
|
||||
|
||||
eval range from 9m to 10m step 1m histogram_count(abs(multi_histogram))
|
||||
|
||||
clear
|
||||
|
||||
# Test native histograms with custom buckets.
|
||||
load 5m
|
||||
custom_buckets_histogram {{schema:-53 sum:5 count:4 custom_values:[5 10] buckets:[1 2 1]}}x10
|
||||
|
|
Loading…
Reference in a new issue