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

Function BenchmarkErrorField

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

Source from the content-addressed store, hash-verified

129}
130
131func BenchmarkErrorField(b *testing.B) {
132 err := errors.New("egad")
133 withBenchedLogger(b, func(log *Logger) {
134 log.Info("Error.", Error(err))
135 })
136}
137
138func BenchmarkErrorsField(b *testing.B) {
139 errs := []error{

Callers

nothing calls this directly

Calls 3

withBenchedLoggerFunction · 0.85
ErrorFunction · 0.85
InfoMethod · 0.45

Tested by

no test coverage detected