(b *testing.B, f Formatter)
| 62 | } |
| 63 | |
| 64 | func doLoggerBenchmarkWithFormatter(b *testing.B, f Formatter) { |
| 65 | b.SetParallelism(100) |
| 66 | log := New() |
| 67 | log.Formatter = f |
| 68 | log.Out = io.Discard |
| 69 | b.RunParallel(func(pb *testing.PB) { |
| 70 | for pb.Next() { |
| 71 | log. |
| 72 | WithField("foo1", "bar1"). |
| 73 | WithField("foo2", "bar2"). |
| 74 | Info("this is a dummy log") |
| 75 | } |
| 76 | }) |
| 77 | } |
no test coverage detected