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

Function BenchmarkExpvarAddParallel

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

Source from the content-addressed store, hash-verified

56}
57
58func BenchmarkExpvarAddParallel(b *testing.B) {
59 expvarMap := initExpvarBaseEquivalent()
60 res := expvarMap.Get("global").(*expvar.Map).Get("resource_utilization").(*expvar.Map).Get("error_count").(*expvar.Int)
61 b.ResetTimer()
62 b.RunParallel(func(pb *testing.PB) {
63 for pb.Next() {
64 res.Add(1)
65 }
66 })
67}
68
69func BenchmarkNewStatsMarshal(b *testing.B) {
70 sgwStats, err := NewSyncGatewayStats()

Callers

nothing calls this directly

Calls 4

initExpvarBaseEquivalentFunction · 0.85
GetMethod · 0.45
NextMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected