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

Function BenchmarkLogEmpty

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

Source from the content-addressed store, hash-verified

13)
14
15func BenchmarkLogEmpty(b *testing.B) {
16 logger := New(io.Discard)
17 b.ResetTimer()
18 b.RunParallel(func(pb *testing.PB) {
19 for pb.Next() {
20 logger.Log().Msg("")
21 }
22 })
23}
24
25func BenchmarkDisabled(b *testing.B) {
26 logger := New(io.Discard).Level(Disabled)

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
MsgMethod · 0.80
NextMethod · 0.65
LogMethod · 0.65

Tested by

no test coverage detected