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

Function BenchmarkWriteSameValue

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

Source from the content-addressed store, hash-verified

92}
93
94func BenchmarkWriteSameValue(b *testing.B) {
95 key := cacheableT{"foo"}
96 value := "bar"
97
98 z := NewCache()
99 for i := 0; i < b.N; i++ {
100 z.Write(&key, value)
101 }
102}
103
104func BenchmarkWriteNewValue(b *testing.B) {
105 value := "bar"

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.95
NewCacheFunction · 0.85

Tested by

no test coverage detected