Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench_bitcoin.cpp
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | int main(int argc, char **argv) { | ||||
double scaling_factor; | double scaling_factor; | ||||
if (!ParseDouble(scaling_str, &scaling_factor)) { | if (!ParseDouble(scaling_str, &scaling_factor)) { | ||||
fprintf(stderr, "Error parsing scaling factor as double: %s\n", | fprintf(stderr, "Error parsing scaling factor as double: %s\n", | ||||
scaling_str.c_str()); | scaling_str.c_str()); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
} | } | ||||
std::unique_ptr<benchmark::Printer> printer( | std::unique_ptr<benchmark::Printer> printer = | ||||
new benchmark::ConsolePrinter()); | std::make_unique<benchmark::ConsolePrinter>(); | ||||
std::string printer_arg = gArgs.GetArg("-printer", DEFAULT_BENCH_PRINTER); | std::string printer_arg = gArgs.GetArg("-printer", DEFAULT_BENCH_PRINTER); | ||||
if ("plot" == printer_arg) { | if ("plot" == printer_arg) { | ||||
printer.reset(new benchmark::PlotlyPrinter( | printer.reset(new benchmark::PlotlyPrinter( | ||||
gArgs.GetArg("-plot-plotlyurl", DEFAULT_PLOT_PLOTLYURL), | gArgs.GetArg("-plot-plotlyurl", DEFAULT_PLOT_PLOTLYURL), | ||||
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; | return EXIT_SUCCESS; | ||||
} | } |