From 0ce5e7fe6d5a0bf41324468b7ae673d2682821ff Mon Sep 17 00:00:00 2001 From: Frederic Branczyk Date: Mon, 8 Aug 2016 10:02:58 +0200 Subject: [PATCH] move legacy test for delta function --- promql/testdata/functions.test | 9 +++++++++ promql/testdata/legacy.test | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/promql/testdata/functions.test b/promql/testdata/functions.test index 58b1ee5720..273585e1e6 100644 --- a/promql/testdata/functions.test +++ b/promql/testdata/functions.test @@ -85,6 +85,15 @@ eval instant at 30m irate(http_requests[50m]) clear +# Tests for delta(). +load 5m + http_requests{path="/foo"} 0 50 100 150 200 + +eval instant at 20m delta(http_requests[20m]) + {path="/foo"} 200 + +clear + # Tests for deriv() and predict_linear(). load 5m testcounter_reset_middle 0+10x4 0+10x5 diff --git a/promql/testdata/legacy.test b/promql/testdata/legacy.test index 6da0281a7b..1556485f8c 100644 --- a/promql/testdata/legacy.test +++ b/promql/testdata/legacy.test @@ -91,11 +91,6 @@ eval instant at 50m x{y="testvalue"} x{y="testvalue"} 100 -# Deltas should be adjusted for target interval vs. samples under target interval. -eval instant at 50m delta(http_requests{group="canary", instance="1", job="app-server"}[18m]) - {group="canary", instance="1", job="app-server"} 288 - - # Rates should calculate per-second rates. eval instant at 50m rate(http_requests{group="canary", instance="1", job="app-server"}[50m]) {group="canary", instance="1", job="app-server"} 0.26666666666666666