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
commit2603c5fa0799be938ce2979ac01ea72d7b9b6304 (patch)
tree009e03dd21c2768efb7c52dd279589baed4825fe
parent3b217fb120ae12d4ed4205aa9bdd214908292f22 (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)
+ }
+}