promql: Add a two-legged benchmark for HistogramStatsIterator

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2025-09-04 00:26:31 +02:00
parent fda99c6b35
commit c84cf3622f

View File

@ -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{