Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench_bitcoin.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | if (HelpRequested(argsman)) { | ||||
return EXIT_SUCCESS; | return EXIT_SUCCESS; | ||||
} | } | ||||
int64_t evaluations = argsman.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS); | int64_t evaluations = argsman.GetArg("-evals", DEFAULT_BENCH_EVALUATIONS); | ||||
std::string regex_filter = argsman.GetArg("-filter", DEFAULT_BENCH_FILTER); | std::string regex_filter = argsman.GetArg("-filter", DEFAULT_BENCH_FILTER); | ||||
std::string scaling_str = argsman.GetArg("-scaling", DEFAULT_BENCH_SCALING); | std::string scaling_str = argsman.GetArg("-scaling", DEFAULT_BENCH_SCALING); | ||||
bool is_list_only = argsman.GetBoolArg("-list", false); | bool is_list_only = argsman.GetBoolArg("-list", false); | ||||
if (evaluations == 0) { | |||||
return EXIT_SUCCESS; | |||||
} else if (evaluations < 0) { | |||||
tfm::format(std::cerr, "Error parsing evaluations argument: %d\n", | |||||
evaluations); | |||||
return EXIT_FAILURE; | |||||
} | |||||
double scaling_factor; | double scaling_factor; | ||||
if (!ParseDouble(scaling_str, &scaling_factor)) { | if (!ParseDouble(scaling_str, &scaling_factor)) { | ||||
tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", | tfm::format(std::cerr, "Error parsing scaling factor as double: %s\n", | ||||
scaling_str); | scaling_str); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
std::unique_ptr<benchmark::Printer> printer = | std::unique_ptr<benchmark::Printer> printer = | ||||
Show All 17 Lines |