From c84cf3622f750596077de02be0a9c9283c7e5519 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 4 Sep 2025 00:26:31 +0200 Subject: [PATCH] promql: Add a two-legged benchmark for HistogramStatsIterator Signed-off-by: beorn7 --- promql/bench_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/promql/bench_test.go b/promql/bench_test.go index d425565788..92831de346 100644 --- a/promql/bench_test.go +++ b/promql/bench_test.go @@ -350,6 +350,14 @@ func BenchmarkNativeHistograms(b *testing.B) { name: "histogram_count with long rate interval", query: "histogram_count(sum(rate(native_histogram_series[20m])))", }, + { + name: "two-legged histogram_count/sum with short rate interval", + query: "histogram_count(sum(rate(native_histogram_series[2m]))) + histogram_sum(sum(rate(native_histogram_series[2m])))", + }, + { + name: "two-legged histogram_count/sum with long rate interval", + query: "histogram_count(sum(rate(native_histogram_series[20m]))) + histogram_sum(sum(rate(native_histogram_series[20m])))", + }, } opts := promql.EngineOpts{