diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2022-02-03 10:53:57 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2022-02-04 09:33:41 -0500 |
commit | 824e1ffa9fd957d05e34f36abe381c2465d89702 (patch) | |
tree | 11a640541956c72fd6d4312ca3438d68a029ae86 /src/bench/bench_bitcoin.cpp | |
parent | 3ace3a17c9bce606cea05192f0da3ac62ac69dda (diff) | |
download | bitcoin-824e1ffa9fd957d05e34f36abe381c2465d89702.tar.xz |
bench: Represents paths with fs::path instead of std::string
Also uses fs::path quoting in bench printed strings and fixes a
misleading error message.
Originally suggested https://github.com/bitcoin/bitcoin/pull/20744#issuecomment-1022486215
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Diffstat (limited to 'src/bench/bench_bitcoin.cpp')
-rw-r--r-- | src/bench/bench_bitcoin.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bench/bench_bitcoin.cpp b/src/bench/bench_bitcoin.cpp index c6c706d77e..3f8bff4bcf 100644 --- a/src/bench/bench_bitcoin.cpp +++ b/src/bench/bench_bitcoin.cpp @@ -6,6 +6,7 @@ #include <clientversion.h> #include <crypto/sha256.h> +#include <fs.h> #include <util/strencodings.h> #include <util/system.h> @@ -108,8 +109,8 @@ int main(int argc, char** argv) args.asymptote = parseAsymptote(argsman.GetArg("-asymptote", "")); args.is_list_only = argsman.GetBoolArg("-list", false); args.min_time = std::chrono::milliseconds(argsman.GetIntArg("-min_time", DEFAULT_MIN_TIME_MS)); - args.output_csv = argsman.GetArg("-output_csv", ""); - args.output_json = argsman.GetArg("-output_json", ""); + args.output_csv = fs::PathFromString(argsman.GetArg("-output_csv", "")); + args.output_json = fs::PathFromString(argsman.GetArg("-output_json", "")); args.regex_filter = argsman.GetArg("-filter", DEFAULT_BENCH_FILTER); benchmark::BenchRunner::RunAll(args); |