MCPcopy Index your code
hub / github.com/upper/db / BenchmarkReadExistentValue

Function BenchmarkReadExistentValue

internal/cache/cache_test.go:114–123  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

112}
113
114func BenchmarkReadExistentValue(b *testing.B) {
115 key := cacheableT{"foo"}
116 value := "bar"
117
118 z := NewCache()
119 z.Write(&key, value)
120 for i := 0; i < b.N; i++ {
121 z.Read(&key)
122 }
123}

Callers

nothing calls this directly

Calls 3

WriteMethod · 0.95
ReadMethod · 0.95
NewCacheFunction · 0.85

Tested by

no test coverage detected