BenchmarkConfigFetch measures the overhead of calling config.Fetch() repeatedly This represents the OLD approach before our optimization
(b *testing.B)
| 111 | // BenchmarkConfigFetch measures the overhead of calling config.Fetch() repeatedly |
| 112 | // This represents the OLD approach before our optimization |
| 113 | func BenchmarkConfigFetch(b *testing.B) { |
| 114 | setupBenchmarkConfig() |
| 115 | |
| 116 | b.ResetTimer() |
| 117 | for i := 0; i < b.N; i++ { |
| 118 | cfg, err := config.Fetch() |
| 119 | if err != nil { |
| 120 | b.Fatal(err) |
| 121 | } |
| 122 | _ = cfg.Transaction.LockDuration |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | // BenchmarkConfigCached measures direct config access |
| 127 | // This represents the NEW approach after our optimization |
nothing calls this directly
no test coverage detected