(b *testing.B)
| 31 | ) |
| 32 | |
| 33 | func BenchmarkJSONLogMarshalerFunc(b *testing.B) { |
| 34 | for i := 0; i < b.N; i++ { |
| 35 | enc := NewJSONEncoder(testEncoderConfig()) |
| 36 | err := enc.AddObject("nested", ObjectMarshalerFunc(func(enc ObjectEncoder) error { |
| 37 | enc.AddInt64("i", int64(i)) |
| 38 | return nil |
| 39 | })) |
| 40 | if err != nil { |
| 41 | b.Fatal(err) |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func BenchmarkZapJSONFloat32AndComplex64(b *testing.B) { |
| 47 | b.RunParallel(func(pb *testing.PB) { |
nothing calls this directly
no test coverage detected