Skip to content

Commit

Permalink
Test case displaying rate() breaking histogram bucket monotonicity
Browse files Browse the repository at this point in the history
Signed-off-by: Vilius Pranckaitis <vpranckaitis@gmail.com>
  • Loading branch information
vpranckaitis committed Feb 29, 2024
1 parent a09465b commit 5e45477
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions promql/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3136,6 +3136,18 @@ func TestRangeQuery(t *testing.T) {
End: time.Unix(120, 0),
Interval: 1 * time.Minute,
},
{
Name: "rate breaking histogram bucket monotonicity",
Load: `load 60s
histogram{le="1"} 5 13 18 24 28 32
histogram{le="+Inf"} 6 14 19 25 29 33
`,
Query: `rate(histogram{le="1"}[10m]) > ignoring(le) rate(histogram{le="+Inf"}[10m])`,
Result: Matrix{},
Start: time.Unix(0, 0),
End: time.Unix(360, 0),
Interval: 30 * time.Second,
},
}
for _, c := range cases {
t.Run(c.Name, func(t *testing.T) {
Expand Down

0 comments on commit 5e45477

Please sign in to comment.