From 3a8d49e167d140441893817ba3ec872fdde37678 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 16 Jan 2019 01:14:35 +0100 Subject: extend benchmarks --- internal/hash/hash_log2_test.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'internal/hash/hash_log2_test.go') diff --git a/internal/hash/hash_log2_test.go b/internal/hash/hash_log2_test.go index f4c8bf3..869edba 100644 --- a/internal/hash/hash_log2_test.go +++ b/internal/hash/hash_log2_test.go @@ -31,7 +31,12 @@ func TestLog2(t *testing.T) { } func BenchmarkLog2(b *testing.B) { - for i := 0; i < b.N; i++ { - log2(1024) + benchCases := []uint32{1, 1024} + for _, bc := range benchCases { + b.Run(fmt.Sprintf("log(%v)", bc), func(b *testing.B) { + for i := 0; i < b.N; i++ { + log2(1024) + } + }) } } -- cgit v1.2.3