(b *testing.B)
| 93 | } |
| 94 | |
| 95 | func BenchmarkNativeJSON(b *testing.B) { |
| 96 | testHandler := slog.NewJSONHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug}) |
| 97 | testLogger := slog.New(testHandler) |
| 98 | |
| 99 | b.ResetTimer() |
| 100 | |
| 101 | for b.Loop() { |
| 102 | testLogger.Info( |
| 103 | handlerBenchmarkMsg, |
| 104 | handlerBenchmarkAttrs..., |
| 105 | ) |
| 106 | } |
| 107 | } |
nothing calls this directly
no outgoing calls
no test coverage detected