File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 benchmarkMemory * bool
4040
4141 benchTime = durationOrCountFlag {d : 1 * time .Second } // changed during test of testing package
42+
43+ runParallelWarningOnce sync.Once
4244)
4345
4446type durationOrCountFlag struct {
@@ -1177,11 +1179,12 @@ func (pb *PB) Next() bool {
11771179// RunParallel reports ns/op values as wall time for the benchmark as a whole,
11781180// not the sum of wall time or CPU time over each parallel goroutine.
11791181func (b * B ) RunParallel (body func (* PB )) {
1180- fmt .Println ("RunParallel is currently unsupported when running with CodSpeed. Continuing without measurements..." )
1181-
11821182 if b .N == 0 {
11831183 return // Nothing to do when probing.
11841184 }
1185+ runParallelWarningOnce .Do (func () {
1186+ fmt .Println ("WARNING: RunParallel is currently unsupported when running with CodSpeed. Continuing without measurements..." )
1187+ })
11851188 // Calculate grain size as number of iterations that take ~100µs.
11861189 // 100µs is enough to amortize the overhead and provide sufficient
11871190 // dynamic load balancing.
You can’t perform that action at this time.
0 commit comments