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

Function BenchmarkFormatterPretty

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

Source from the content-addressed store, hash-verified

28}
29
30func BenchmarkFormatterPretty(b *testing.B) {
31 testHandler := logger.NewHandler(io.Discard, &logger.Config{
32 Level: slog.LevelDebug,
33 Format: logger.FormatPretty,
34 })
35 testLogger := slog.New(testHandler)
36
37 b.ResetTimer()
38
39 for b.Loop() {
40 testLogger.Info(
41 handlerBenchmarkMsg,
42 handlerBenchmarkAttrs...,
43 )
44 }
45}
46
47func BenchmarkFormatterStructured(b *testing.B) {
48 testHandler := logger.NewHandler(io.Discard, &logger.Config{

Callers

nothing calls this directly

Calls 1

NewHandlerFunction · 0.92

Tested by

no test coverage detected