MCPcopy Create free account
hub / github.com/cortexproject/cortex / BenchmarkDisallowedLogLevels

Function BenchmarkDisallowedLogLevels

pkg/util/log/log_test.go:34–43  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

32}
33
34func BenchmarkDisallowedLogLevels(b *testing.B) {
35 cfg := &server.Config{}
36 require.NoError(b, cfg.LogLevel.Set("warn"))
37 InitLogger(cfg)
38
39 for i := 0; b.Loop(); i++ {
40 level.Info(Logger).Log("hello", "world", "number", i)
41 level.Debug(Logger).Log("hello", "world", "number", i)
42 }
43}

Callers

nothing calls this directly

Calls 4

InitLoggerFunction · 0.85
LoopMethod · 0.80
SetMethod · 0.65
LogMethod · 0.45

Tested by

no test coverage detected