优化指标统计性能

This commit is contained in:
刘祥超
2023-08-15 20:12:09 +08:00
parent 6f51fe52f8
commit 40e137e69e
7 changed files with 131 additions and 29 deletions

View File

@@ -14,3 +14,11 @@ func TestHash(t *testing.T) {
t.Log(key + " => " + types.String(h))
}
}
func BenchmarkHashString(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
fnv.HashString("abcdefh")
}
})
}