Skip to content

Commit fdb41e0

Browse files
committed
Merge bitcoin/bitcoin#29773: build, bench, msvc: Add missing benchmarks
31a15f0 bench: Disable WalletCreate* benchmarks when building with MSVC (Hennadii Stepanov) 23dc0c1 msvc, bench: Add missing source files to bench_bitcoin project (Hennadii Stepanov) Pull request description: On the master branch, the `bench_bitcoin.vcxproj` MSVC project misses wallet-specific source files. This PR fixes this issue. Benchmark run on Windows: ``` > src\bench_bitcoin.exe -filter="CoinSelection|BnBExhaustion|Wallet.*" | ns/op | op/s | err% | total | benchmark |--------------------:|--------------------:|--------:|----------:|:---------- | 398,800.00 | 2,507.52 | 1.5% | 0.01 | `BnBExhaustion` | 584,450.00 | 1,711.01 | 1.5% | 0.01 | `CoinSelection` | 86,603,650.00 | 11.55 | 0.4% | 1.91 | `WalletAvailableCoins` | 7,604.00 | 131,509.73 | 0.9% | 0.01 | `WalletBalanceClean` | 124,028.57 | 8,062.66 | 2.6% | 0.01 | `WalletBalanceDirty` | 7,587.12 | 131,802.30 | 1.9% | 0.01 | `WalletBalanceMine` | 48.58 | 20,583,872.99 | 0.9% | 0.01 | `WalletBalanceWatch` | 2,371,060.00 | 421.75 | 1.3% | 0.13 | `WalletCreateTxUseOnlyPresetInputs` | 96,861,760.00 | 10.32 | 0.9% | 5.31 | `WalletCreateTxUsePresetInputsAndCoinSelection` | 280.71 | 3,562,424.13 | 1.5% | 0.01 | `WalletIsMineDescriptors` | 1,033.47 | 967,618.32 | 0.3% | 0.01 | `WalletIsMineLegacy` | 282.36 | 3,541,599.91 | 0.5% | 0.01 | `WalletIsMineMigratedDescriptors` | 484,547,300.00 | 2.06 | 1.0% | 2.43 | `WalletLoadingDescriptors` | 29,924,300.00 | 33.42 | 0.4% | 0.15 | `WalletLoadingLegacy` ``` ACKs for top commit: maflcko: lgtm ACK 31a15f0 Tree-SHA512: 0241af06126edf612489322cdce66ba43792066b5400b1719a8b9d1ec62030e8a9d497e2f01e38290e94c387db59ccf2a458f4b35d3dc8030a1a1413d89eb792
2 parents 00ac1b9 + 31a15f0 commit fdb41e0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

build_msvc/bench_bitcoin/bench_bitcoin.vcxproj.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
</PropertyGroup>
1111
<ItemGroup>
1212
@SOURCE_FILES@
13+
<ClCompile Include="..\..\src\bench\coin_selection.cpp" />
14+
<ClCompile Include="..\..\src\bench\wallet_balance.cpp" />
15+
<ClCompile Include="..\..\src\bench\wallet_create.cpp" />
16+
<ClCompile Include="..\..\src\bench\wallet_create_tx.cpp" />
17+
<ClCompile Include="..\..\src\bench\wallet_ismine.cpp" />
18+
<ClCompile Include="..\..\src\bench\wallet_loading.cpp" />
1319
</ItemGroup>
1420
<ItemGroup>
1521
<ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">

src/bench/wallet_create.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,14 @@ static void WalletCreate(benchmark::Bench& bench, bool encrypted)
5151
static void WalletCreatePlain(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/false); }
5252
static void WalletCreateEncrypted(benchmark::Bench& bench) { WalletCreate(bench, /*encrypted=*/true); }
5353

54+
#ifndef _MSC_VER
55+
// TODO: Being built with MSVC, the fs::remove_all() call in
56+
// the WalletCreate() fails with the error "The process cannot
57+
// access the file because it is being used by another process."
5458
#ifdef USE_SQLITE
5559
BENCHMARK(WalletCreatePlain, benchmark::PriorityLevel::LOW);
5660
BENCHMARK(WalletCreateEncrypted, benchmark::PriorityLevel::LOW);
5761
#endif
62+
#endif
5863

5964
} // namespace wallet

0 commit comments

Comments
 (0)