Skip to content

Commit

Permalink
Add test for increase too
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn committed Oct 4, 2024
1 parent 18c1f87 commit 5584320
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/streamingpromql/testdata/ours/native_histograms.test
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,12 @@ eval_warn range from 0 to 18m step 6m sum(metric)

clear

# Test rate() over native histograms with changing schemas.
# Test rate() and increase() over native histograms with changing schemas.
load 1m
metric {{schema:4 sum:2 count:2 buckets:[2]}} {{schema:2 sum:6 count:12 buckets:[12]}} {{schema:3 sum:12 count:24 buckets:[24]}} {{schema:4 sum:164 count:326 buckets:[326]}}

eval instant at 3m rate(metric[3m])
{} {{schema:2 sum:1 count:2 buckets:[2] counter_reset_hint:gauge}}

eval instant at 3m increase(metric[3m])
{} {{schema:2 sum:180 count:360 buckets:[360] counter_reset_hint:gauge}}

0 comments on commit 5584320

Please sign in to comment.