MCPcopy
hub / github.com/uber-go/zap / BenchmarkDurationField

Function BenchmarkDurationField

logger_bench_test.go:125–129  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

123}
124
125func BenchmarkDurationField(b *testing.B) {
126 withBenchedLogger(b, func(log *Logger) {
127 log.Info("Duration", Duration("foo", time.Second))
128 })
129}
130
131func BenchmarkErrorField(b *testing.B) {
132 err := errors.New("egad")

Callers

nothing calls this directly

Calls 3

withBenchedLoggerFunction · 0.85
DurationFunction · 0.85
InfoMethod · 0.45

Tested by

no test coverage detected