We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
b.Loop
1 parent 34a065c commit 26a4da3Copy full SHA for 26a4da3
internal/server/router_test.go
@@ -442,19 +442,19 @@ func BenchmarkHostServiceMap_WilcardRouting(b *testing.B) {
442
}
443
444
b.Run("exact match", func(b *testing.B) {
445
- for i := 0; i < b.N; i++ {
+ for b.Loop() {
446
_ = hsm.ServiceForHost("one.example.com")
447
448
})
449
450
b.Run("wildcard match", func(b *testing.B) {
451
452
_ = hsm.ServiceForHost("anything.two.example.com")
453
454
455
456
b.Run("default match", func(b *testing.B) {
457
458
_ = hsm.ServiceForHost("missing.example.com")
459
460
0 commit comments