moby / buildkit-bench

Set of benchmarks for BuildKit
https://moby.github.io/buildkit-bench/
Apache License 2.0
0 stars 2 forks source link

test: run a single iteration for benchmark by default #117

Closed crazy-max closed 1 month ago

crazy-max commented 1 month ago

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.