We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8de6b42 commit 19f4788Copy full SHA for 19f4788
benchmain_test.go
@@ -63,7 +63,7 @@ func BenchmarkGeneratedBenchinit(b *testing.B) {
63
rxIndexBytes := rxInitTrace.SubexpIndex("bytes")
64
rxIndexAllocs := rxInitTrace.SubexpIndex("allocs")
65
66
- for i := 0; i < b.N; i++ {
+ for b.Loop() {
67
// We only want the test binary to run the init funcs,
68
// so the help flag is one way to stop the main func early.
69
// TODO: we could also use TestMain to stop right away if an env var is set.
0 commit comments