Skip to content

Commit 4f31c21

Browse files
committed
bench: Make all arguments -kebab-case
This is customary for UNIX-style arguments, and more consistent with our other tools
1 parent 652b54e commit 4f31c21

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/bench/bench_bitcoin.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ static void SetupBenchArgs(ArgsManager& argsman)
2626
argsman.AddArg("-asymptote=<n1,n2,n3,...>", "Test asymptotic growth of the runtime of an algorithm, if supported by the benchmark", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
2727
argsman.AddArg("-filter=<regex>", strprintf("Regular expression filter to select benchmark by name (default: %s)", DEFAULT_BENCH_FILTER), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
2828
argsman.AddArg("-list", "List benchmarks without executing them", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
29-
argsman.AddArg("-min_time=<milliseconds>", strprintf("Minimum runtime per benchmark, in milliseconds (default: %d)", DEFAULT_MIN_TIME_MS), ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_NEGATION, OptionsCategory::OPTIONS);
30-
argsman.AddArg("-output_csv=<output.csv>", "Generate CSV file with the most important benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
31-
argsman.AddArg("-output_json=<output.json>", "Generate JSON file with all benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
29+
argsman.AddArg("-min-time=<milliseconds>", strprintf("Minimum runtime per benchmark, in milliseconds (default: %d)", DEFAULT_MIN_TIME_MS), ArgsManager::ALLOW_ANY | ArgsManager::DISALLOW_NEGATION, OptionsCategory::OPTIONS);
30+
argsman.AddArg("-output-csv=<output.csv>", "Generate CSV file with the most important benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
31+
argsman.AddArg("-output-json=<output.json>", "Generate JSON file with all benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
3232
argsman.AddArg("-sanity-check", "Run benchmarks for only one iteration", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
3333
}
3434

@@ -74,7 +74,7 @@ int main(int argc, char** argv)
7474
" sure each run has exactly the same preconditions.\n"
7575
"\n"
7676
" * If results are still not reliable, increase runtime with e.g.\n"
77-
" -min_time=5000 to let a benchmark run for at least 5 seconds.\n"
77+
" -min-time=5000 to let a benchmark run for at least 5 seconds.\n"
7878
"\n"
7979
" * bench_bitcoin uses nanobench [3] for which there is extensive\n"
8080
" documentation available online.\n"
@@ -109,9 +109,9 @@ int main(int argc, char** argv)
109109
benchmark::Args args;
110110
args.asymptote = parseAsymptote(argsman.GetArg("-asymptote", ""));
111111
args.is_list_only = argsman.GetBoolArg("-list", false);
112-
args.min_time = std::chrono::milliseconds(argsman.GetIntArg("-min_time", DEFAULT_MIN_TIME_MS));
113-
args.output_csv = argsman.GetPathArg("-output_csv");
114-
args.output_json = argsman.GetPathArg("-output_json");
112+
args.min_time = std::chrono::milliseconds(argsman.GetIntArg("-min-time", DEFAULT_MIN_TIME_MS));
113+
args.output_csv = argsman.GetPathArg("-output-csv");
114+
args.output_json = argsman.GetPathArg("-output-json");
115115
args.regex_filter = argsman.GetArg("-filter", DEFAULT_BENCH_FILTER);
116116
args.sanity_check = argsman.GetBoolArg("-sanity-check", false);
117117

0 commit comments

Comments
 (0)