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

Function BenchmarkIncrementInt

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

Source from the content-addressed store, hash-verified

1670}
1671
1672func BenchmarkIncrementInt(b *testing.B) {
1673 b.StopTimer()
1674 tc := New(DefaultExpiration, 0)
1675 tc.Set("foo", 0, DefaultExpiration)
1676 b.StartTimer()
1677 for i := 0; i < b.N; i++ {
1678 tc.IncrementInt("foo", 1)
1679 }
1680}
1681
1682func BenchmarkDeleteExpiredLoop(b *testing.B) {
1683 b.StopTimer()

Callers

nothing calls this directly

Calls 3

IncrementIntMethod · 0.80
NewFunction · 0.70
SetMethod · 0.65

Tested by

no test coverage detected