bench: Require semicolon after BENCHMARK(foo)
This makes the code more consistent. Also, use "using BenchFunction = ..." while touching the header. Also, fixup the whitespace after and earlier scripted-diff.
This commit is contained in:
2 files changed
+5
-5
No files matched your search
+3
-3
@@ -38,7 +38,7 @@ namespace benchmark {
|
|||||||
|
|
||||||
using ankerl::nanobench::Bench;
|
using ankerl::nanobench::Bench;
|
||||||
|
|
||||||
typedef std::function<void(Bench&)> BenchFunction;
|
using BenchFunction = std::function<void(Bench&)>;
|
||||||
|
|
||||||
struct Args {
|
struct Args {
|
||||||
bool is_list_only;
|
bool is_list_only;
|
||||||
@@ -64,8 +64,8 @@ public:
|
|||||||
};
|
};
|
||||||
} // namespace benchmark
|
} // namespace benchmark
|
||||||
|
|
||||||
// BENCHMARK(foo) expands to: benchmark::BenchRunner bench_runner_foo{"foo", foo};
|
// BENCHMARK(foo); expands to: benchmark::BenchRunner bench_runner_foo{"foo", foo};
|
||||||
#define BENCHMARK(n) \
|
#define BENCHMARK(n) \
|
||||||
benchmark::BenchRunner PASTE2(bench_runner_, n){STRINGIZE(n), n};
|
benchmark::BenchRunner PASTE2(bench_runner_, n) { STRINGIZE(n), n }
|
||||||
|
|
||||||
#endif // BITCOIN_BENCH_BENCH_H
|
#endif // BITCOIN_BENCH_BENCH_H
|
||||||
@@ -215,6 +215,6 @@ static void WalletCreateTxUsePresetInputsAndCoinSelection(benchmark::Bench& benc
|
|||||||
|
|
||||||
static void WalletAvailableCoins(benchmark::Bench& bench) { AvailableCoins(bench, {OutputType::BECH32M}); }
|
static void WalletAvailableCoins(benchmark::Bench& bench) { AvailableCoins(bench, {OutputType::BECH32M}); }
|
||||||
|
|
||||||
BENCHMARK(WalletCreateTxUseOnlyPresetInputs)
|
BENCHMARK(WalletCreateTxUseOnlyPresetInputs);
|
||||||
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection)
|
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection);
|
||||||
BENCHMARK(WalletAvailableCoins);
|
BENCHMARK(WalletAvailableCoins);
|
||||||
Reference in new issue
Block a user