MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / SetupBenchArgs

Function SetupBenchArgs

src/bench/bench_bitcoin.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22static constexpr int64_t DEFAULT_MIN_TIME_MS{10};
23
24static void SetupBenchArgs(ArgsManager& argsman)
25{
26 SetupHelpOptions(argsman);
27 SetupCommonTestArgs(argsman);
28
29 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);
30 argsman.AddArg("-filter=<regex>", strprintf("Regular expression filter to select benchmark by name (default: %s)", DEFAULT_BENCH_FILTER), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
31 argsman.AddArg("-list", "List benchmarks without executing them", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
32 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);
33 argsman.AddArg("-output-csv=<output.csv>", "Generate CSV file with the most important benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
34 argsman.AddArg("-output-json=<output.json>", "Generate JSON file with all benchmark results", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
35 argsman.AddArg("-sanity-check", "Run benchmarks for only one iteration with no output", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
36}
37
38// parses a comma separated list like "10,20,30,50"
39static std::vector<double> parseAsymptote(const std::string& str) {

Callers 1

mainFunction · 0.85

Calls 3

SetupHelpOptionsFunction · 0.85
SetupCommonTestArgsFunction · 0.85
AddArgMethod · 0.80

Tested by

no test coverage detected