aboutsummaryrefslogtreecommitdiff
path: root/internal/hash/hash_func_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hash/hash_func_test.go')
-rw-r--r--internal/hash/hash_func_test.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/internal/hash/hash_func_test.go b/internal/hash/hash_func_test.go
index 15919c3..a021ad8 100644
--- a/internal/hash/hash_func_test.go
+++ b/internal/hash/hash_func_test.go
@@ -28,8 +28,16 @@ func TestDefaultHash(t *testing.T) {
}
func BenchmarkDefaultHash(b *testing.B) {
- key := []byte("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
- for i := 0; i < b.N; i++ {
- defaultHash(key)
+ benchCases := []string{
+ "A",
+ "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG",
+ }
+ for _, bc := range benchCases {
+ b.Run(bc, func(b *testing.B) {
+ key := []byte(bc)
+ for i := 0; i < b.N; i++ {
+ defaultHash(key)
+ }
+ })
}
}