From 31eb3b286da03e9ba89dadcd1d5e7a923a7ae05c Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 5 Aug 2025 14:21:23 +0100 Subject: [PATCH] [TESTS] PromQL: shrink work done in BenchmarkRangeQuery Previously, BenchmarkRangeQuery would run each case with three data sizes (1, 10, 100) and three range lengths (1, 100, 1000) for nine variations. With 36 cases, running with `-count=6` to get dependable results, would take 40-50 minutes in total. This PR removes the middle option in both dimensions, thus shrinking to four variations and about 20 minutes to run everything. Signed-off-by: Bryan Boreham --- promql/bench_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/promql/bench_test.go b/promql/bench_test.go index 695b2c1eb4..c9f1b998ed 100644 --- a/promql/bench_test.go +++ b/promql/bench_test.go @@ -247,7 +247,6 @@ func rangeQueryCases() []benchCase { tmp = append(tmp, c) } else { tmp = append(tmp, benchCase{expr: strings.ReplaceAll(c.expr, "X", "one"), steps: c.steps}) - tmp = append(tmp, benchCase{expr: strings.ReplaceAll(c.expr, "X", "ten"), steps: c.steps}) tmp = append(tmp, benchCase{expr: strings.ReplaceAll(c.expr, "X", "hundred"), steps: c.steps}) } } @@ -260,7 +259,6 @@ func rangeQueryCases() []benchCase { tmp = append(tmp, c) } else { tmp = append(tmp, benchCase{expr: c.expr, steps: 1}) - tmp = append(tmp, benchCase{expr: c.expr, steps: 100}) tmp = append(tmp, benchCase{expr: c.expr, steps: 1000}) } }