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

Function BenchmarkNewStatAdd

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

Source from the content-addressed store, hash-verified

77}
78
79func BenchmarkNewStatAdd(b *testing.B) {
80 sgwStats, err := NewSyncGatewayStats()
81 require.NoError(b, err)
82
83 b.ResetTimer()
84 for n := 0; n < b.N; n++ {
85 sgwStats.GlobalStats.ResourceUtilizationStats().ErrorCount.Add(1)
86 }
87}
88
89func BenchmarkNewStatSet(b *testing.B) {
90 sgwStats, err := NewSyncGatewayStats()

Callers

nothing calls this directly

Calls 3

NewSyncGatewayStatsFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected