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

Function BenchmarkToggleLogKeys

base/log_keys_test.go:172–185  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

170}
171
172func BenchmarkToggleLogKeys(b *testing.B) {
173 b.Run("Enable", func(bn *testing.B) {
174 logKeyMask := logKeyMask(KeyCRUD, KeyDCP, KeyReplicate)
175 for i := 0; i < bn.N; i++ {
176 logKeyMask.Enable(KeyHTTP)
177 }
178 })
179 b.Run("Disable", func(bn *testing.B) {
180 logKeyMask := logKeyMask(KeyCRUD, KeyDCP, KeyReplicate)
181 for i := 0; i < bn.N; i++ {
182 logKeyMask.Disable(KeyDCP)
183 }
184 })
185}
186
187func BenchmarkLogKeyName(b *testing.B) {
188 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 4

logKeyMaskFunction · 0.85
EnableMethod · 0.80
DisableMethod · 0.80
RunMethod · 0.65

Tested by

no test coverage detected