MCPcopy
hub / github.com/coocood/freecache / BenchmarkHashFunc

Function BenchmarkHashFunc

cache_test.go:1185–1193  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1183}
1184
1185func BenchmarkHashFunc(b *testing.B) {
1186 key := make([]byte, 8)
1187 rand.Read(key)
1188
1189 b.ResetTimer()
1190 for i := 0; i < b.N; i++ {
1191 hashFunc(key)
1192 }
1193}
1194
1195func benchmarkTTL(expireSeconds int) func(b *testing.B) {
1196 return func(b *testing.B) {

Callers

nothing calls this directly

Calls 1

hashFuncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…