Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Apr 9, 2020

The benches have always set up one global testing setup. This makes it hard to pick no testing setup at all or one with different params.

Fix this by removing any global state setup from the main bench.cpp and leave the setup to each individual bench.

One reason to have one global testing setup is to set the datadir location to a tempdir to avoid reading or writing in the default datadir location. But #13687 should prevent this already.

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 16, 2020

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

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.

@maflcko maflcko force-pushed the 2004-benchNoGlobalReg branch from fa89091 to fa1fdb0 Compare April 17, 2020 14:21
@maflcko
Copy link
Member Author

maflcko commented Apr 17, 2020

Rebased, diff is smaller and easier to review now that #18673 has been merged

@maflcko maflcko merged commit a7a6f1f into bitcoin:master Apr 22, 2020
@maflcko maflcko deleted the 2004-benchNoGlobalReg branch April 22, 2020 14:55
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 23, 2020
…ame testing setup

fa1fdb0 bench: Replace ::mempool globabl with test_setup.mempool (MarcoFalke)
fab1170 bench: Remove requirement that all benches use RegTestingSetup (MarcoFalke)

Pull request description:

  The benches have always set up one global testing setup. This makes it hard to pick no testing setup at all or one with different params.

  Fix this by removing any global state setup from the main `bench.cpp` and leave the setup to each individual bench.

  One reason to have one global testing setup is to set the datadir location to a tempdir to avoid reading or writing in the default datadir location. But bitcoin#13687 should prevent this already.

Top commit has no ACKs.

Tree-SHA512: 7c98aea7725a20f4b9225221f4279b9e9f7257ed5c14712ad01ea80d87c3b0fed760b40f413892498bbb354a917ee02d4c575cbe8423a403b86755e8ee11f33b
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 22, 2021
Summary:
> The benches have always set up one global testing setup. This makes it hard to pick no testing setup at all or one with different params.
>
> Fix this by removing any global state setup from the main bench.cpp and leave the setup to each individual bench.
>
> One reason to have one global testing setup is to set the datadir location to a tempdir to avoid reading or writing in the default datadir location. But #13687 should prevent this already.

Commit fab117096446ab63d1f38c1ef6edbc94a5d4ab52
> bench: Remove requirement that all benches use RegTestingSetup

Commit fa1fdb02fccd0f670f7b08ee61c249f04d0db17f
> bench: Replace ::mempool globabl with test_setup.mempool
> This is a refactor, since they are aliases for each other

This is a backport of Core [[bitcoin/bitcoin#18575 | PR18575]]

The changes in `verify_script.cpp` are not relevant to ABC.

Test Plan: ninja all && src/bench/bitcoin-bench

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9040
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants