Skip to content

Commit

Permalink
Address PR feedback: add further test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn committed Sep 5, 2024
1 parent 085fa96 commit 889649a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/streamingpromql/testdata/ours/functions.test
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,19 @@ eval instant at 54m scalar(multiple_series)
clear

load 6m
metric{series="float"} 1 2 3 4 -5
metric{series="float"} 1 2 3 4 -5 0 NaN -NaN
metric{series="histogram"} {{schema:3 sum:4 count:23 buckets:[1 2 4] n_buckets:[3 5 8]}} {{schema:3 sum:14 count:27 buckets:[1 2 6] n_buckets:[3 5 10]}}

# Unary negation of a native histogram currently does nothing in Prometheus' engine, which seems incorrect, but we mirror its behaviour for consistency.
# See https://github.com/prometheus/prometheus/pull/14821 for more discussion.
eval range from 0 to 24m step 6m -metric
{series="float"} -1 -2 -3 -4 5
eval range from 0 to 42m step 6m -metric
{series="float"} -1 -2 -3 -4 5 0 -NaN NaN
{series="histogram"} {{schema:3 sum:4 count:23 buckets:[1 2 4] n_buckets:[3 5 8]}} {{schema:3 sum:14 count:27 buckets:[1 2 6] n_buckets:[3 5 10]}}

clear

load 1m
metric 1 _ _ 3 _ stale 4 _

eval range from 0 to 7m step 1m -metric
{} -1 -1 -1 -3 -3 _ -4 -4

0 comments on commit 889649a

Please sign in to comment.