aboutsummaryrefslogtreecommitdiff
path: root/tests/performance_tests/main.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-03-04 21:22:51 +0200
committerRiccardo Spagni <ric@spagni.net>2019-03-04 21:22:51 +0200
commita28237c9cacb074216b1ee1db40da32acde3acd0 (patch)
treeef8341e9821ba4d251bf588bd8b3adf148c4c528 /tests/performance_tests/main.cpp
parentMerge pull request #5096 (diff)
parentperformance_tests: better stats, and keep track of timing history (diff)
downloadmonero-a28237c9cacb074216b1ee1db40da32acde3acd0.tar.xz
Merge pull request #5102
1eef0565 performance_tests: better stats, and keep track of timing history (moneromooo-monero)
Diffstat (limited to 'tests/performance_tests/main.cpp')
-rw-r--r--tests/performance_tests/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp
index 86450760c..22a86cb59 100644
--- a/tests/performance_tests/main.cpp
+++ b/tests/performance_tests/main.cpp
@@ -77,10 +77,12 @@ int main(int argc, char** argv)
const command_line::arg_descriptor<bool> arg_verbose = { "verbose", "Verbose output", false };
const command_line::arg_descriptor<bool> arg_stats = { "stats", "Including statistics (min/median)", false };
const command_line::arg_descriptor<unsigned> arg_loop_multiplier = { "loop-multiplier", "Run for that many times more loops", 1 };
+ const command_line::arg_descriptor<std::string> arg_timings_database = { "timings-database", "Keep timings history in a file" };
command_line::add_arg(desc_options, arg_filter);
command_line::add_arg(desc_options, arg_verbose);
command_line::add_arg(desc_options, arg_stats);
command_line::add_arg(desc_options, arg_loop_multiplier);
+ command_line::add_arg(desc_options, arg_timings_database);
po::variables_map vm;
bool r = command_line::handle_error_helper(desc_options, [&]()
@@ -93,7 +95,10 @@ int main(int argc, char** argv)
return 1;
const std::string filter = tools::glob_to_regex(command_line::get_arg(vm, arg_filter));
+ const std::string timings_database = command_line::get_arg(vm, arg_timings_database);
Params p;
+ if (!timings_database.empty())
+ p.td = TimingsDatabase(timings_database);
p.verbose = command_line::get_arg(vm, arg_verbose);
p.stats = command_line::get_arg(vm, arg_stats);
p.loop_multiplier = command_line::get_arg(vm, arg_loop_multiplier);