(b *testing.B)
| 166 | } |
| 167 | |
| 168 | func BenchmarkAddCallerHook(b *testing.B) { |
| 169 | logger := New( |
| 170 | zapcore.NewCore( |
| 171 | zapcore.NewJSONEncoder(NewProductionConfig().EncoderConfig), |
| 172 | &ztest.Discarder{}, |
| 173 | InfoLevel, |
| 174 | ), |
| 175 | AddCaller(), |
| 176 | ) |
| 177 | b.ResetTimer() |
| 178 | b.RunParallel(func(pb *testing.PB) { |
| 179 | for pb.Next() { |
| 180 | logger.Info("Caller.") |
| 181 | } |
| 182 | }) |
| 183 | } |
| 184 | |
| 185 | func BenchmarkAddCallerAndStacktrace(b *testing.B) { |
| 186 | logger := New( |
nothing calls this directly
no test coverage detected
searching dependent graphs…