aboutsummaryrefslogtreecommitdiff
path: root/src/bench/bench.h
diff options
context:
space:
mode:
authorMartin Ankerl <martin.ankerl@gmail.com>2021-09-18 08:38:20 +0200
committerMartin Ankerl <martin.ankerl@gmail.com>2021-09-21 14:45:48 +0200
commitd3c6f8bfa12f78635752878b28e66cec0c85d4a9 (patch)
treeaa0c96f88435e0ec8bda3610653c471bec7ff509 /src/bench/bench.h
parent9fef8329322277d9c14c8df1867cb3c61477c431 (diff)
downloadbitcoin-d3c6f8bfa12f78635752878b28e66cec0c85d4a9.tar.xz
bench: introduce -min_time argument
When it is not easily possible to stabilize benchmark machine and code the argument -min_time can be used to specify a minimum duration that a benchmark should take. E.g. choose -min_time=1000 if you are willing to wait about 1 second for each benchmark result. The default is now set to 10ms instead of 0, which should make runs on fast machines more stable with negligible slowdown.
Diffstat (limited to 'src/bench/bench.h')
-rw-r--r--src/bench/bench.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bench/bench.h b/src/bench/bench.h
index c4fcd80e33..3bce23ab6d 100644
--- a/src/bench/bench.h
+++ b/src/bench/bench.h
@@ -43,6 +43,7 @@ typedef std::function<void(Bench&)> BenchFunction;
struct Args {
std::string regex_filter;
bool is_list_only;
+ std::chrono::milliseconds min_time;
std::vector<double> asymptote;
std::string output_csv;
std::string output_json;