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

Function BenchmarkNewCacheAndClear

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

Source from the content-addressed store, hash-verified

76}
77
78func BenchmarkNewCacheAndClear(b *testing.B) {
79 for i := 0; i < b.N; i++ {
80 c := NewCache()
81 c.Clear()
82 }
83}
84
85func BenchmarkReadNonExistentValue(b *testing.B) {
86 key := cacheableT{"foo"}

Callers

nothing calls this directly

Calls 2

ClearMethod · 0.95
NewCacheFunction · 0.85

Tested by

no test coverage detected