MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / Benchmark_LoggingPerformance

Function Benchmark_LoggingPerformance

base/logging_test.go:47–60  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

45}
46
47func Benchmark_LoggingPerformance(b *testing.B) {
48
49 SetUpBenchmarkLogging(b, LevelInfo, KeyHTTP, KeyCRUD)
50
51 ctx := TestCtx(b)
52 b.ResetTimer()
53
54 for i := 0; i < b.N; i++ {
55 DebugfCtx(ctx, KeyCRUD, "some crud'y message")
56 InfofCtx(ctx, KeyCRUD, "some crud'y message")
57 WarnfCtx(ctx, "some crud'y message")
58 ErrorfCtx(ctx, "some crud'y message")
59 }
60}
61
62func TestLogRotationInterval(t *testing.T) {
63 LongRunningTest(t)

Callers

nothing calls this directly

Calls 6

SetUpBenchmarkLoggingFunction · 0.85
TestCtxFunction · 0.85
DebugfCtxFunction · 0.85
WarnfCtxFunction · 0.85
ErrorfCtxFunction · 0.85
InfofCtxFunction · 0.70

Tested by

no test coverage detected