Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Evgeny Safronov <division494@gmail.com>
Fabien Pichot <pichot.fabien@gmail.com>
Federico Ficarelli <federico.ficarelli@gmail.com>
Felix Homann <linuxaudio@showlabor.de>
Felmon Fekadu <felmonon@gmail.com>
Gergely Meszaros <maetveis@gmail.com>
Gergő Szitár <szitar.gergo@gmail.com>
Google Inc.
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Fabien Pichot <pichot.fabien@gmail.com>
Fanbo Meng <fanbo.meng@ibm.com>
Federico Ficarelli <federico.ficarelli@gmail.com>
Felix Homann <linuxaudio@showlabor.de>
Felmon Fekadu <felmonon@gmail.com>
Geoffrey Martin-Noble <gcmn@google.com> <gmngeoffrey@gmail.com>
Gergely Meszaros <maetveis@gmail.com>
Gergő Szitár <szitar.gergo@gmail.com>
Expand Down
26 changes: 26 additions & 0 deletions docs/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,32 @@ iterations is at least one, not more than 1e9, until CPU time is greater than
the minimum time, or the wallclock time is 5x minimum time. The minimum time is
set per benchmark by calling `MinTime` on the registered benchmark object.

The minimum time can also be set for all benchmarks with the
`--benchmark_min_time=<value>` command-line option. This flag supports two
forms:

* `--benchmark_min_time=<float>s` sets the minimum running time for each
benchmark repetition in seconds.
* `--benchmark_min_time=<integer>x` runs each benchmark repetition for an
explicit number of iterations instead of using the dynamic time-based
iteration selection. This applies to benchmarks that do not already specify
an explicit iteration count in code.

For compatibility, bare numeric values such as `--benchmark_min_time=0.5` are
also interpreted as seconds, but the explicit `s` suffix is preferred for
clarity.

For example:

```bash
$ ./run_benchmarks.x --benchmark_min_time=0.5s
$ ./run_benchmarks.x --benchmark_min_time=100x
```

If a benchmark specifies its own `MinTime()` or `Iterations()` in code, those
per-benchmark settings take precedence over the corresponding
`--benchmark_min_time` command-line forms.

Furthermore warming up a benchmark might be necessary in order to get
stable results because of e.g caching effects of the code under benchmark.
Warming up means running the benchmark a given amount of time, before
Expand Down
Loading