MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / BenchmarkNativeText

Function BenchmarkNativeText

logger/handler_test.go:81–93  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

79}
80
81func 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
95func BenchmarkNativeJSON(b *testing.B) {
96 testHandler := slog.NewJSONHandler(io.Discard, &slog.HandlerOptions{Level: slog.LevelDebug})

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected