Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench_bitcoin.cpp
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
int main(int argc, char **argv) { | int main(int argc, char **argv) { | ||||
SetupBenchArgs(); | SetupBenchArgs(); | ||||
std::string error; | std::string error; | ||||
if (!gArgs.ParseParameters(argc, argv, error)) { | if (!gArgs.ParseParameters(argc, argv, error)) { | ||||
fprintf(stderr, "Error parsing command line arguments: %s\n", | fprintf(stderr, "Error parsing command line arguments: %s\n", | ||||
error.c_str()); | error.c_str()); | ||||
return false; | return EXIT_FAILURE; | ||||
} | } | ||||
if (HelpRequested(gArgs)) { | if (HelpRequested(gArgs)) { | ||||
std::cout << gArgs.GetHelpMessage(); | std::cout << gArgs.GetHelpMessage(); | ||||
return 0; | return EXIT_SUCCESS; | ||||
} | } | ||||
SHA256AutoDetect(); | SHA256AutoDetect(); | ||||
RandomInit(); | RandomInit(); | ||||
ECC_Start(); | ECC_Start(); | ||||
SetupEnvironment(); | SetupEnvironment(); | ||||
// don't want to write to debug.log file | // don't want to write to debug.log file | ||||
Show All 15 Lines | if ("plot" == printer_arg) { | ||||
gArgs.GetArg("-plot-width", DEFAULT_PLOT_WIDTH), | gArgs.GetArg("-plot-width", DEFAULT_PLOT_WIDTH), | ||||
gArgs.GetArg("-plot-height", DEFAULT_PLOT_HEIGHT))); | gArgs.GetArg("-plot-height", DEFAULT_PLOT_HEIGHT))); | ||||
} | } | ||||
benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, | benchmark::BenchRunner::RunAll(*printer, evaluations, scaling_factor, | ||||
regex_filter, is_list_only); | regex_filter, is_list_only); | ||||
ECC_Stop(); | ECC_Stop(); | ||||
return EXIT_SUCCESS; | |||||
} | } |