Skip to content

Commit 7090562

Browse files
janiszcristaloleg
authored andcommitted
fix read benchmarks (#201)
Number of shards in `read` benchmarks is always set to 1024 instead of parametrized value.
1 parent b161e1c commit 7090562

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bigcache_bench_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ func BenchmarkWriteToCache(b *testing.B) {
5656
func BenchmarkReadFromCache(b *testing.B) {
5757
for _, shards := range []int{1, 512, 1024, 8192} {
5858
b.Run(fmt.Sprintf("%d-shards", shards), func(b *testing.B) {
59-
readFromCache(b, 1024, false)
59+
readFromCache(b, shards, false)
6060
})
6161
}
6262
}
6363

6464
func BenchmarkReadFromCacheWithInfo(b *testing.B) {
6565
for _, shards := range []int{1, 512, 1024, 8192} {
6666
b.Run(fmt.Sprintf("%d-shards", shards), func(b *testing.B) {
67-
readFromCache(b, 1024, true)
67+
readFromCache(b, shards, true)
6868
})
6969
}
7070
}

0 commit comments

Comments
 (0)