MCPcopy
hub / github.com/rs/zerolog / BenchmarkDisabled

Function BenchmarkDisabled

benchmark_test.go:25–33  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

23}
24
25func BenchmarkDisabled(b *testing.B) {
26 logger := New(io.Discard).Level(Disabled)
27 b.ResetTimer()
28 b.RunParallel(func(pb *testing.PB) {
29 for pb.Next() {
30 logger.Info().Msg(fakeMessage)
31 }
32 })
33}
34
35func BenchmarkInfo(b *testing.B) {
36 logger := New(io.Discard)

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
LevelMethod · 0.80
MsgMethod · 0.80
NextMethod · 0.65
InfoMethod · 0.65

Tested by

no test coverage detected