From e673d8b475995075b696208386c9e45ae7ca3e20 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 20 Apr 2022 12:53:42 -0400 Subject: bench: Enable loading benchmarks depending on what's compiled Add descriptor wallet benchmark only if sqlite is compiled. Add legacy wallet benchmark only if bdb is compiled. --- src/bench/wallet_loading.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/bench') diff --git a/src/bench/wallet_loading.cpp b/src/bench/wallet_loading.cpp index 0bbafee76e..f611383788 100644 --- a/src/bench/wallet_loading.cpp +++ b/src/bench/wallet_loading.cpp @@ -122,8 +122,12 @@ static void WalletLoading(benchmark::Bench& bench, bool legacy_wallet) }); } +#ifdef USE_BDB static void WalletLoadingLegacy(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/true); } -static void WalletLoadingDescriptors(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/false); } - BENCHMARK(WalletLoadingLegacy); +#endif + +#ifdef USE_SQLITE +static void WalletLoadingDescriptors(benchmark::Bench& bench) { WalletLoading(bench, /*legacy_wallet=*/false); } BENCHMARK(WalletLoadingDescriptors); +#endif -- cgit v1.2.3