Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Documented benchmark-resolution-multiple command line option

- and increased default to 100
Commit
699e571400955aa0a9b7bd4212cf5a058bcf550f
Author
Phil Nash ·
Parents
07ded8154118

Files · Download .tar.gz

Changes

 docs/command-line.md              | 8 ++++++++
 include/internal/catch_config.hpp | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/docs/command-line.md b/docs/command-line.md
index a0a18be3..cc944734 100644
--- a/docs/command-line.md
+++ b/docs/command-line.md
@@ -29,6 +29,7 @@ Click one of the followings links to take you straight to that option - or scrol
 <a href="#rng-seed">                                    `    --rng-seed`</a><br />
 <a href="#libidentify">                                 `    --libidentify`</a><br />
 <a href="#wait-for-keypress">                           `    --wait-for-keypress`</a><br />
+<a href="#benchmark-resolution-multiple">               `    --benchmark-resolution-multiple`</a><br />
 
 </br>
 
@@ -228,6 +229,13 @@ See [The LibIdentify repo for more information and examples](https://github.com/
 Will cause the executable to print a message and wait until the return/ enter key is pressed before continuing -
 either before running any tests, after running all tests - or both, depending on the argument.
 
+<a id="benchmark-resolution-multiple"></a>
+## Specify multiples of clock resolution to run benchmarks for
+<pre>--benchmark-resolution-multiple &lt;multiplier&gt;</pre>
+
+When running benchmarks the clock resolution is estimated. Benchmarks are then run for exponentially increasing
+numbers of iterations until some multiple of the estimated resolution is exceed. By default that multiple is 100, but 
+it can be overriden here.
 
 <a id="usage"></a>
 ## Usage
diff --git a/include/internal/catch_config.hpp b/include/internal/catch_config.hpp
index 61669897..d2ca6202 100644
--- a/include/internal/catch_config.hpp
+++ b/include/internal/catch_config.hpp
@@ -39,7 +39,7 @@ namespace Catch {
 
         int abortAfter = -1;
         unsigned int rngSeed = 0;
-        int benchmarkResolutionMultiple = 10;
+        int benchmarkResolutionMultiple = 100;
 
         Verbosity verbosity = Verbosity::Normal;
         WarnAbout::What warnings = WarnAbout::Nothing;