MCPcopy Create free account
hub / github.com/patrickmn/go-cache / BenchmarkCacheSetDelete

Function BenchmarkCacheSetDelete

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

Source from the content-addressed store, hash-verified

1604}
1605
1606func BenchmarkCacheSetDelete(b *testing.B) {
1607 b.StopTimer()
1608 tc := New(DefaultExpiration, 0)
1609 b.StartTimer()
1610 for i := 0; i < b.N; i++ {
1611 tc.Set("foo", "bar", DefaultExpiration)
1612 tc.Delete("foo")
1613 }
1614}
1615
1616func BenchmarkRWMutexMapSetDelete(b *testing.B) {
1617 b.StopTimer()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
SetMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…