(b *testing.B)
| 33 | ) |
| 34 | |
| 35 | func BenchmarkBoolsArrayMarshaler(b *testing.B) { |
| 36 | // Keep this benchmark here to capture the overhead of the ArrayMarshaler |
| 37 | // wrapper. |
| 38 | bs := make([]bool, 50) |
| 39 | enc := zapcore.NewJSONEncoder(zapcore.EncoderConfig{}) |
| 40 | b.ResetTimer() |
| 41 | for i := 0; i < b.N; i++ { |
| 42 | Bools("array", bs).AddTo(enc.Clone()) |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func BenchmarkBoolsReflect(b *testing.B) { |
| 47 | bs := make([]bool, 50) |
nothing calls this directly
no test coverage detected