aboutsummaryrefslogtreecommitdiff
path: root/tests/performance_tests/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/performance_tests/main.cpp')
-rw-r--r--tests/performance_tests/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/performance_tests/main.cpp b/tests/performance_tests/main.cpp
index bfe6de895..e6558a364 100644
--- a/tests/performance_tests/main.cpp
+++ b/tests/performance_tests/main.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2018, The Monero Project
+// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
@@ -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);
@@ -193,7 +198,10 @@ int main(int argc, char** argv)
TEST_PERFORMANCE2(filter, p, test_wallet2_expand_subaddresses, 50, 200);
- TEST_PERFORMANCE0(filter, p, test_cn_slow_hash);
+ TEST_PERFORMANCE1(filter, p, test_cn_slow_hash, 0);
+ TEST_PERFORMANCE1(filter, p, test_cn_slow_hash, 1);
+ TEST_PERFORMANCE1(filter, p, test_cn_slow_hash, 2);
+ TEST_PERFORMANCE1(filter, p, test_cn_slow_hash, 4);
TEST_PERFORMANCE1(filter, p, test_cn_fast_hash, 32);
TEST_PERFORMANCE1(filter, p, test_cn_fast_hash, 16384);