aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-01-16 00:24:46 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-01-16 00:24:46 +0100
commit75dcd2d3f84836e7a362f8b2027093838439ee57 (patch)
treedad8eecadadc569c372850c73ca03582d11a4560
parent501faca55806fe21992961864dd4b493f2f1d626 (diff)
add benchmark
-rw-r--r--internal/hash/hash_func_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/hash/hash_func_test.go b/internal/hash/hash_func_test.go
index 5ce39b4..15919c3 100644
--- a/internal/hash/hash_func_test.go
+++ b/internal/hash/hash_func_test.go
@@ -26,3 +26,10 @@ 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)
+ }
+}