MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / BenchmarkCacheSetDelete

Function BenchmarkCacheSetDelete

pkg/util/cache/cache_test.go:1622–1630  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1620}
1621
1622func BenchmarkCacheSetDelete(b *testing.B) {
1623 b.StopTimer()
1624 tc := New(DefaultExpiration, 0)
1625 b.StartTimer()
1626 for i := 0; i < b.N; i++ {
1627 tc.Set("foo", "bar", DefaultExpiration)
1628 tc.Delete("foo")
1629 }
1630}
1631
1632func BenchmarkRWMutexMapSetDelete(b *testing.B) {
1633 b.StopTimer()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
SetMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected