From 393ab9e12e302a334e69ba066e61275ad2d4a5f2 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 31 Oct 2025 13:02:24 +0000 Subject: [PATCH] [TEST] TSDB: More realistic BenchmarkIntersect 100,000 matchers is not something that could happen while using Prometheus. Signed-off-by: Bryan Boreham --- tsdb/index/postings_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsdb/index/postings_test.go b/tsdb/index/postings_test.go index 3ba523c22f..fbbfc95a47 100644 --- a/tsdb/index/postings_test.go +++ b/tsdb/index/postings_test.go @@ -347,13 +347,13 @@ func BenchmarkIntersect(t *testing.B) { } }) - // Many matchers(k >> n). + // Many matchers. t.Run("ManyPostings", func(bench *testing.B) { var lps []*ListPostings var refs [][]storage.SeriesRef - // Create 100000 matchers(k=100000), making sure all memory allocation is done before starting the loop. - for range 100000 { + // Create 100 matchers, making sure all memory allocation is done before starting the loop. + for range 100 { var temp []storage.SeriesRef for j := storage.SeriesRef(1); j < 100; j++ { temp = append(temp, j)