bench: Add reindex_tx_graph benchmark#1968
Merged
ValuedMammal merged 3 commits intobitcoindevkit:masterfrom Jul 3, 2025
Merged
bench: Add reindex_tx_graph benchmark#1968ValuedMammal merged 3 commits intobitcoindevkit:masterfrom
reindex_tx_graph benchmark#1968ValuedMammal merged 3 commits intobitcoindevkit:masterfrom
Conversation
Collaborator
Author
|
This is what I found compared to the same test (but no cache) on master: Running benches/indexer.rs (target/release/deps/index-d7b15ff0fa7d9bb0)
reindex_tx_graph time: [649.59 us 656.47 us 667.48 us]
change: [-99.043% -99.038% -99.032%] (p = 0.00 < 0.05)
Performance has improved. |
ea64aef to
bb6d7c1
Compare
Collaborator
There was a problem hiding this comment.
tACK bb6d7c1
Thanks for the documentation fixup, got similar results when running locally:
Gnuplot not found, disabling plotting
reindex_tx_graph time: [320.04 us 320.93 us 322.03 us]
change: [-99.087% -99.084% -99.081%] (p = 0.00 < 0.05)
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
4 (4.00%) high mild
5 (5.00%) high severe
Gnuplot not found, disabling plotting
LagginTimes
reviewed
Jun 13, 2025
Contributor
LagginTimes
left a comment
There was a problem hiding this comment.
Looking good! I get the same benchmark results:
reindex_tx_graph time: [300.23 us 301.44 us 302.84 us]
change: [-99.286% -99.278% -99.268%] (p = 0.00 < 0.05)
Performance has improved.
Found 16 outliers among 100 measurements (16.00%)
7 (7.00%) high mild
9 (9.00%) high severe
Just one minor suggestion:
LagginTimes
reviewed
Jun 13, 2025
| assert_eq!(did, desc.descriptor_id()); | ||
| for (&i, cached_spk) in cached_spks { | ||
| // Cached spk matches derived | ||
| assert_eq!(exp_spks.get(&i), Some(cached_spk)); |
Contributor
There was a problem hiding this comment.
Suggested change
| assert_eq!(exp_spks.get(&i), Some(cached_spk)); | |
| let exp_spk = desc.at_derivation_index(i).unwrap().script_pubkey(); | |
| assert_eq!(&exp_spk, cached_spk); |
Might be cleaner to remove the exp_spks on line 1138 entirely and do a direct lookup inside the loop.
bb6d7c1 to
cb55c51
Compare
Collaborator
Author
|
Thanks @LagginTimes |
- Test cached spk matches derived - Recover state of spk cache from changeset
Fixed parameter names to match the function or struct definition, and correct some spelling mistakes.
cb55c51 to
f51f5b5
Compare
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following changes:
reindex_tx_graph. Run withcargo bench -p bdk_chain --bench indexer.keychain_txoutmodule to test behavior of spk-cache.Checklists
All Submissions:
cargo +nightly fmtandcargo clippybefore committing