Skip to content

Commit

Permalink
Configure the 'high eviction' benchmark to always evict
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Pracucci <[email protected]>
  • Loading branch information
pracucci committed Sep 28, 2023
1 parent 8d92930 commit a5d218d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tsdb/postings_for_matchers_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a5d218d

Please sign in to comment.