-
Notifications
You must be signed in to change notification settings - Fork 38.8k
bench: Benchmark MempoolToJSON #15473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Nice, concept ACK. Changes to |
1aaaaa8 to
fa38535
Compare
|
Thx. Force pushed with changes correctly split up into the commits |
| bench_bench_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/ | ||
| bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | ||
| bench_bench_bitcoin_LDADD = \ | ||
| $(LIBBITCOIN_SERVER) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC this is the first bench touching RPC functionality.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, 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. |
|
Concept ACK |
|
Anyone an idea how to fix the appveyor linker error? cc @ken2812221 |
|
concept ACK Comments trigged by this PR, but not directly related:
I would infer similar behavior in getrawmempool return values.
|
|
Seems that bench_bitcoin does not have univalue include path. I created PR #15503 to solve it. |
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK fa38535. Nice cleanup and new benchmark.
fa38535 bench: Benchmark MempoolToJSON (MarcoFalke) fa5dc35 rpc: Pass mempool into MempoolToJSON (MarcoFalke) Pull request description: This is used in production (e.g. https://jochen-hoenicke.de/queue/#0,24h), so add a benchmark to avoid making it even slower. Related: * "getrawmempool true RPC call is O(n^2)" #14765 Tree-SHA512: da09d2e54ee261af8671152f97f863cf1acd7a6adc6578e94046b1ec9e647a670c67499760ef765254f65522dfdf773c3c8729006fa2d63ccb6d53166bafc425
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 bitcoin/bitcoin#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 ``` 2. Verify that the compiler has not emitted a `thread-safety` warning. 3. Run the node: `./src/bitcoind -regtest` 4. Verify that text similar to `"Assertion failed: lock ... not held ..."` is not printed on `stderr`. 5. 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
This is used in production (e.g. https://jochen-hoenicke.de/queue/#0,24h), so add a benchmark to avoid making it even slower.
Related: