HomePhabricator

bench: Benchmark MempoolToJSON

Description

bench: Benchmark MempoolToJSON

Summary:
This is used in production (e.g. https://jochen-hoenicke.de/queue/#0,24h), so add a benchmark to avoid making it even slower.

Backport of Bitcoin Core PR15473
https://github.com/bitcoin/bitcoin/pull/15473

Test Plan:

  1. Build with Clang in Debug mode:
CXX=clang++ CC=clang cmake .. -D CMAKE_CXX_FLAGS="-Werror=thread-safety-analysis" -GNinja -DCMAKE_BUILD_TYPE=Debug
ninja check-all
  1. Verify that the compiler has not emitted a thread-safety warning.
  2. Run the node: ./src/bitcoind -regtest
  3. Verify that text similar to "Assertion failed: lock ... not held ..." is not printed on stderr.
  1. Run benchmarks:
cmake .. -GNinja
ninja bench-bitcoin
./src/bench/bitcoin-bench

Reviewers: Fabien, #bitcoin_abc, deadalnix

Reviewed By: Fabien, #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D4234

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Oct 23 2019, 18:04
fpelliccioniCommitted on Oct 25 2019, 13:56
fpelliccioniPushed on Oct 25 2019, 13:56
Reviewer
Restricted Project
Differential Revision
D4234: bench: Benchmark MempoolToJSON
Parents
rABCf15d3c8c03ed: Merge #14444: Add compile time checking for cs_main locks which we assert at…
Branches
Unknown
Tags
Unknown