MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / BenchmarkExpvarSet

Function BenchmarkExpvarSet

base/stats_test.go:40–47  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

38}
39
40func BenchmarkExpvarSet(b *testing.B) {
41 expvarMap := initExpvarBaseEquivalent()
42
43 b.ResetTimer()
44 for n := 0; n < b.N; n++ {
45 expvarMap.Get("global").(*expvar.Map).Get("resource_utilization").(*expvar.Map).Get("error_count").(*expvar.Int).Set(1)
46 }
47}
48
49func BenchmarkExpvarGet(b *testing.B) {
50 expvarMap := initExpvarBaseEquivalent()

Callers

nothing calls this directly

Calls 3

initExpvarBaseEquivalentFunction · 0.85
SetMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected