(b *testing.B)
| 45 | } |
| 46 | |
| 47 | func 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 | |
| 62 | func TestLogRotationInterval(t *testing.T) { |
| 63 | LongRunningTest(t) |