aboutsummaryrefslogtreecommitdiff
path: root/tests/performance_tests/main.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-12-28 12:38:46 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-28 15:45:37 +0000
commit1eef05658812a881af9b143aed723102e015908b (patch)
tree0189bd9bbca40bbf30ce14b60f65caf122460bf0 /tests/performance_tests/main.cpp
parentMerge pull request #4843 (diff)
downloadmonero-1eef05658812a881af9b143aed723102e015908b.tar.xz
performance_tests: better stats, and keep track of timing history
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 6749b71e4..bffbf699b 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);