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

Function BenchmarkErrorsField

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

Source from the content-addressed store, hash-verified

136}
137
138func BenchmarkErrorsField(b *testing.B) {
139 errs := []error{
140 errors.New("egad"),
141 errors.New("oh no"),
142 errors.New("dear me"),
143 errors.New("such fail"),
144 }
145 withBenchedLogger(b, func(log *Logger) {
146 log.Info("Errors.", Errors("errors", errs))
147 })
148}
149
150func BenchmarkStackField(b *testing.B) {
151 withBenchedLogger(b, func(log *Logger) {

Callers

nothing calls this directly

Calls 3

withBenchedLoggerFunction · 0.85
ErrorsFunction · 0.85
InfoMethod · 0.45

Tested by

no test coverage detected