Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench_bitcoin.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | static void SetupBenchArgs() { | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-plot-width=<x>", | "-plot-width=<x>", | ||||
strprintf(_("Plot width in pixel (default: %u)"), DEFAULT_PLOT_WIDTH), | strprintf(_("Plot width in pixel (default: %u)"), DEFAULT_PLOT_WIDTH), | ||||
false, OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
gArgs.AddArg( | gArgs.AddArg( | ||||
"-plot-height=<x>", | "-plot-height=<x>", | ||||
strprintf(_("Plot height in pixel (default: %u)"), DEFAULT_PLOT_HEIGHT), | strprintf(_("Plot height in pixel (default: %u)"), DEFAULT_PLOT_HEIGHT), | ||||
false, OptionsCategory::OPTIONS); | false, OptionsCategory::OPTIONS); | ||||
// Hidden | |||||
gArgs.AddArg("-h", "", false, OptionsCategory::HIDDEN); | |||||
gArgs.AddArg("-help", "", false, OptionsCategory::HIDDEN); | |||||
} | } | ||||
int main(int argc, char **argv) { | int main(int argc, char **argv) { | ||||
SetupBenchArgs(); | SetupBenchArgs(); | ||||
gArgs.ParseParameters(argc, argv); | std::string error; | ||||
if (!gArgs.ParseParameters(argc, argv, error)) { | |||||
fprintf(stderr, "Error parsing command line arguments: %s\n", | |||||
error.c_str()); | |||||
return false; | |||||
} | |||||
if (HelpRequested(gArgs)) { | if (HelpRequested(gArgs)) { | ||||
std::cout << gArgs.GetHelpMessage(); | std::cout << gArgs.GetHelpMessage(); | ||||
return 0; | return 0; | ||||
} | } | ||||
SHA256AutoDetect(); | SHA256AutoDetect(); | ||||
RandomInit(); | RandomInit(); | ||||
Show All 28 Lines |