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

Function BenchmarkNewStatSet

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

Source from the content-addressed store, hash-verified

87}
88
89func BenchmarkNewStatSet(b *testing.B) {
90 sgwStats, err := NewSyncGatewayStats()
91 require.NoError(b, err)
92
93 b.ResetTimer()
94 for n := 0; n < b.N; n++ {
95 sgwStats.GlobalStats.ResourceUtilizationStats().ErrorCount.Set(1)
96 }
97}
98
99func BenchmarkNewStatGet(b *testing.B) {
100 sgwStats, err := NewSyncGatewayStats()

Callers

nothing calls this directly

Calls 3

NewSyncGatewayStatsFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected