(b *testing.B)
| 79 | } |
| 80 | |
| 81 | func BenchmarkNativeText(b *testing.B) { |
| 82 | testHandler := slog.NewTextHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug}) |
| 83 | testLogger := slog.New(testHandler) |
| 84 | |
| 85 | b.ResetTimer() |
| 86 | |
| 87 | for b.Loop() { |
| 88 | testLogger.Info( |
| 89 | handlerBenchmarkMsg, |
| 90 | handlerBenchmarkAttrs..., |
| 91 | ) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | func BenchmarkNativeJSON(b *testing.B) { |
| 96 | testHandler := slog.NewJSONHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug}) |
nothing calls this directly
no outgoing calls
no test coverage detected