Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_commandline.cpp
diff options
context:
space:
mode:
authorJoachim Meyer2019-04-23 23:41:13 +0200
committerMartin Hořeňovský2019-06-06 19:33:37 +0200
commitce2560ca956c1743f8bc871e0bf95f65a3db887c (patch)
tree3ee045a34c2795852246d5abbb777c7db8437d14 /include/internal/catch_commandline.cpp
parent00347f1e79260e76d5072cca5b3636868397dda5 (diff)
downloadcatch3-ce2560ca956c1743f8bc871e0bf95f65a3db887c.tar.gz
Integrate Nonius benchmark into Catch2
Changes done to Nonius: * Moved things into "Catch::Benchmark" namespace * Benchmarks were integrated with `TEST_CASE`/`SECTION`/`GENERATE` macros * Removed Nonius's parameters for benchmarks, Generators should be used instead * Added relevant methods to the reporter interface (default-implemented, to avoid breaking existing 3rd party reporters) * Async processing is guarded with `_REENTRANT` macro for GCC/Clang, used by default on MSVC * Added a macro `CATCH_CONFIG_DISABLE_BENCHMARKING` that removes all traces of benchmarking from Catch
Diffstat (limited to 'include/internal/catch_commandline.cpp')
-rw-r--r--include/internal/catch_commandline.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/internal/catch_commandline.cpp b/include/internal/catch_commandline.cpp
index 66759ebb..82a67827 100644
--- a/include/internal/catch_commandline.cpp
+++ b/include/internal/catch_commandline.cpp
@@ -196,11 +196,21 @@ namespace Catch {
| Opt( setWaitForKeypress, "start|exit|both" )
["--wait-for-keypress"]
( "waits for a keypress before exiting" )
- | Opt( config.benchmarkResolutionMultiple, "multiplier" )
- ["--benchmark-resolution-multiple"]
- ( "multiple of clock resolution to run benchmarks" )
-
- | Arg( config.testsOrTags, "test name|pattern|tags" )
+#ifndef CATCH_CONFIG_DISABLE_BENCHMARKING
+ | Opt( config.benchmarkSamples, "samples" )
+ ["--benchmark-samples"]
+ ( "number of samples to collect (default: 100)" )
+ | Opt( config.benchmarkResamples, "resamples" )
+ ["--benchmark-resamples"]
+ ( "number of resamples for the bootstrap (default: 100000)" )
+ | Opt( config.benchmarkConfidenceInterval, "confidence interval" )
+ ["--benchmark-confidence-interval"]
+ ( "confidence interval for the bootstrap (between 0 and 1, default: 0.95)" )
+ | Opt( config.benchmarkNoAnalysis )
+ ["--benchmark-no-analysis"]
+ ( "perform only measurements; do not perform any analysis" )
+#endif // CATCH_CONFIG_DISABLE_BENCHMARKING
+ | Arg( config.testsOrTags, "test name|pattern|tags" )
( "which test or tests to use" );
return cli;