mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-09 02:59:31 +08:00
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:
@@ -38,7 +38,7 @@ namespace benchmark {
|
||||
|
||||
using ankerl::nanobench::Bench;
|
||||
|
||||
typedef std::function<void(Bench&)> BenchFunction;
|
||||
using BenchFunction = std::function<void(Bench&)>;
|
||||
|
||||
struct Args {
|
||||
bool is_list_only;
|
||||
@@ -64,8 +64,8 @@ public:
|
||||
};
|
||||
} // 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) \
|
||||
benchmark::BenchRunner PASTE2(bench_runner_, n){STRINGIZE(n), n};
|
||||
benchmark::BenchRunner PASTE2(bench_runner_, n) { STRINGIZE(n), n }
|
||||
|
||||
#endif // BITCOIN_BENCH_BENCH_H
|
||||
|
||||
@@ -116,7 +116,7 @@ static void PrevectorFillVectorIndirect(benchmark::Bench& bench)
|
||||
{ \
|
||||
Prevector##name<nontrivial_t>(bench); \
|
||||
} \
|
||||
BENCHMARK(Prevector##name##Nontrivial); \
|
||||
BENCHMARK(Prevector##name##Nontrivial); \
|
||||
static void Prevector##name##Trivial(benchmark::Bench& bench) \
|
||||
{ \
|
||||
Prevector##name<trivial_t>(bench); \
|
||||
|
||||
@@ -215,6 +215,6 @@ static void WalletCreateTxUsePresetInputsAndCoinSelection(benchmark::Bench& benc
|
||||
|
||||
static void WalletAvailableCoins(benchmark::Bench& bench) { AvailableCoins(bench, {OutputType::BECH32M}); }
|
||||
|
||||
BENCHMARK(WalletCreateTxUseOnlyPresetInputs)
|
||||
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection)
|
||||
BENCHMARK(WalletCreateTxUseOnlyPresetInputs);
|
||||
BENCHMARK(WalletCreateTxUsePresetInputsAndCoinSelection);
|
||||
BENCHMARK(WalletAvailableCoins);
|
||||
|
||||
Reference in New Issue
Block a user