mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-05 12:26:14 +02:00
promqltest: Add regression test for mixed-sample commit order
Regression test for: - https://github.com/prometheus/prometheus/issues/14172 - https://github.com/prometheus/prometheus/issues/15177 Test cases are by @krajorama, taken from commit b48bc9dc7e2ac553528763297cca73014357d542 . Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
parent
7e82bdb75b
commit
385d2800c9
@ -1677,3 +1677,18 @@ eval instant at 1m histogram_count(histogram unless histogram_quantile(0.5, hist
|
||||
eval instant at 1m histogram_quantile(0.5, histogram unless histogram_count(histogram) == 0)
|
||||
{} 3.1748021039363987
|
||||
|
||||
clear
|
||||
|
||||
# Regression test for:
|
||||
# https://github.com/prometheus/prometheus/issues/14172
|
||||
# https://github.com/prometheus/prometheus/issues/15177
|
||||
load 1m
|
||||
mixed_metric1 1 2 3 {{schema:0 sum:5 count:4 buckets:[1 2 1]}} {{schema:0 sum:8 count:6 buckets:[1 4 1]}} 4 5 {{schema:0 sum:18 count:10 buckets:[3 4 3]}}
|
||||
mixed_metric2 1 2 3 {{schema:0 sum:5 count:4 buckets:[1 2 1]}} {{schema:0 sum:8 count:6 buckets:[1 4 1]}}
|
||||
|
||||
# The order of the float vs native histograms is preserved.
|
||||
eval range from 0 to 8m step 1m mixed_metric1
|
||||
mixed_metric1{} 1 2 3 {{count:4 sum:5 buckets:[1 2 1]}} {{count:6 sum:8 buckets:[1 4 1]}} 4 5 {{schema:0 sum:18 count:10 buckets:[3 4 3]}} {{schema:0 sum:18 count:10 buckets:[3 4 3]}}
|
||||
|
||||
eval range from 0 to 5m step 1m mixed_metric2
|
||||
mixed_metric2 1 2 3 {{count:4 sum:5 buckets:[1 2 1]}} {{count:6 sum:8 buckets:[1 4 1]}} {{count:6 sum:8 buckets:[1 4 1]}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user