wallet, bench: Use Nanobench setup() for wallet benchmarks, and remove DuplicateMockDatabase #35018

pull achow101 wants to merge 3 commits into bitcoin:master from achow101:wallet-bench-setups changing 7 files +111 −114
  1. achow101 commented at 10:22 pm on April 6, 2026: member

    Several of the wallet benchmarks have some setup or cleanup that needs to be done per run. Now that #34208 is merged, these can use setup(). Additionally, this allows for removing DuplicateMockDatabase in WalletEncryptDescriptors.

    This PR also removes DuplicateMockDatabase in WalletLoadingDescriptors. DuplicateMockDatabase was added here in #24924 as part of benchmark performance improvements. However, it does not appear to make a significant difference today.

    Removing DuplicateMockDatabase makes future database changes easier. In particular it should simplify #33032 and #33034, and any future changes that introduce sqlite features.

  2. DrahtBot commented at 10:22 pm on April 6, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK davidgumberg

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #33034 (wallet: Store transactions in a separate sqlite table by achow101)
    • #33032 (wallet, test: Replace MockableDatabase with in-memory SQLiteDatabase by achow101)
    • #25722 (refactor: Use util::Result class for wallet loading by ryanofsky)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot added the label CI failed on Apr 6, 2026
  4. davidgumberg commented at 0:23 am on April 7, 2026: contributor
    Concept ACK
  5. bench: Use nanobench setup api in wallet benchmarks 35a5b7e5c5
  6. bench: Utilize setup() for WalletLoading and use a real database
    Instead of making a mock database and duplicating it for the benchmark,
    use a real database. Also use setup() to avoid measuring the overhead in
    the benchmark.
    dd39cebdc2
  7. wallet, test: Remove DuplicateMockDatabase bedfbe9033
  8. achow101 force-pushed on Apr 7, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-08 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me