From a5d218d53d96380560465fb3b4db4e07563f3a70 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Thu, 28 Sep 2023 11:12:40 +0200 Subject: [PATCH] Configure the 'high eviction' benchmark to always evict Signed-off-by: Marco Pracucci --- tsdb/postings_for_matchers_cache_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdb/postings_for_matchers_cache_test.go b/tsdb/postings_for_matchers_cache_test.go index d7dc3c40ba..b9a13effdc 100644 --- a/tsdb/postings_for_matchers_cache_test.go +++ b/tsdb/postings_for_matchers_cache_test.go @@ -381,7 +381,7 @@ func BenchmarkPostingsForMatchersCache(b *testing.B) { b.Run("high eviction rate", func(b *testing.B) { // Configure the cache to evict continuously. - cache := NewPostingsForMatchersCache(time.Hour, 1, 1, true) + cache := NewPostingsForMatchersCache(time.Hour, 0, 0, true) cache.postingsForMatchers = func(ctx context.Context, ix IndexPostingsReader, ms ...*labels.Matcher) (index.Postings, error) { return index.NewListPostings(refs), nil }