aboutsummaryrefslogtreecommitdiff
path: root/src/bench/wallet_balance.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-29 08:30:06 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-29 08:30:15 -0400
commitaf2ec6b03745cf408f169cfbd74e3380a69975e0 (patch)
tree9852bbd1a4df18a0c67a112f1ce283d386dc0f1c /src/bench/wallet_balance.cpp
parentecca2ea1d5f6460e3a1ace1ae666c7c8b3d4487a (diff)
parentfabe44e8154a6068d6cba91ec30f00345ed7b275 (diff)
Merge #18759: bench: Start nodes with -nodebuglogfile
fabe44e8154a6068d6cba91ec30f00345ed7b275 bench: Start nodes with -nodebuglogfile (MarcoFalke) Pull request description: For benchmarking we don't want to depend on the speed of the disk or the amount of debug logging ACKs for top commit: fanquake: ACK fabe44e8154a6068d6cba91ec30f00345ed7b275 - This makes some of these benchmarks significantly faster to run. MempoolEviction total runtime is down from ~46s to 11s on my machine: Tree-SHA512: d99700901650325896b9115d20b84a27042152f46266f595bf7ea1414528c0b346f4e707a12ee8b8ba99c35cf155e645e67971c1b2a679c4e609c400ff8b08ae
Diffstat (limited to 'src/bench/wallet_balance.cpp')
-rw-r--r--src/bench/wallet_balance.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bench/wallet_balance.cpp b/src/bench/wallet_balance.cpp
index 05d61fca22..810c344ab5 100644
--- a/src/bench/wallet_balance.cpp
+++ b/src/bench/wallet_balance.cpp
@@ -14,7 +14,14 @@
static void WalletBalance(benchmark::State& state, const bool set_dirty, const bool add_watchonly, const bool add_mine)
{
- RegTestingSetup test_setup;
+ TestingSetup test_setup{
+ CBaseChainParams::REGTEST,
+ /* extra_args */ {
+ "-nodebuglogfile",
+ "-nodebug",
+ },
+ };
+
const auto& ADDRESS_WATCHONLY = ADDRESS_BCRT1_UNSPENDABLE;
NodeContext node;
@@ -25,7 +32,7 @@ static void WalletBalance(benchmark::State& state, const bool set_dirty, const b
bool first_run;
if (wallet.LoadWallet(first_run) != DBErrors::LOAD_OK) assert(false);
}
- auto handler = chain->handleNotifications({ &wallet, [](CWallet*) {} });
+ auto handler = chain->handleNotifications({&wallet, [](CWallet*) {}});
const Optional<std::string> address_mine{add_mine ? Optional<std::string>{getnewaddress(wallet)} : nullopt};
if (add_watchonly) importaddress(wallet, ADDRESS_WATCHONLY);