优化指标统计性能

This commit is contained in:
GoEdgeLab
2023-08-15 20:12:09 +08:00
parent 42ebb4514d
commit f7851563a9
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")
}
})
}