In some cases we have really tiny benchmark and therefore we needed to adjust benchtime to avoid the benchmark to hang as there would not have been enough iteration. Instead of using a duration we can just default to the number of iteration we want, in this case 1x:
-benchtime t
Run enough iterations of each benchmark to take t, specified
as a time.Duration (for example, -benchtime 1h30s).
The default is 1 second (1s).
The special syntax Nx means to run the benchmark N times
(for example, -benchtime 100x).
As follow-up we can look what benchmarks need iteration adjustment.
In some cases we have really tiny benchmark and therefore we needed to adjust benchtime to avoid the benchmark to hang as there would not have been enough iteration. Instead of using a duration we can just default to the number of iteration we want, in this case
1x
:As follow-up we can look what benchmarks need iteration adjustment.