bench: BlockAssembler on a mempool with packages
Summary:
Performance of block template building matters as miners likely want to be able to start mining on a block with transactions asap after a block is found. We would want to know if a mempool PR accidentally caused, for example, a 100x slowdown. An AssembleBlock() bench exists, but it operates on a mempool with 101 transactions, each with 0 ancestors or descendants and with the same fee. Adding a bench with a more complex mempool is useful because (1) it's more realistic (2) updating packages can potentially cause the algorithm to take a long time.
Backport of core#26695.
This has been slightly adapted to match our codebase and the use of the BlockFitter class.
Depends on D18313.
Test Plan:
ninja check ninja bench-bitcoin
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18314