-
Notifications
You must be signed in to change notification settings - Fork 111
[storage/mmr/mem] add benchmark for non-MMR leaf updates of the mem::mmr #1001
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
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.
Pull Request Overview
This pull request introduces a new benchmark for non-MMR leaf updates in the mem::mmr module.
- A new benchmark function (bench_update) is added to simulate random MMR leaf updates and measure performance for various input sizes.
- The benchmark is integrated into the Criterion test harness, and the corresponding module is included in the benchmark suite.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
storage/src/mmr/benches/update.rs | Added benchmark function to measure non-MMR leaf updates performance. |
storage/src/mmr/benches/bench.rs | Included the update benchmark in the Criterion main entry point. |
Comments suppressed due to low confidence (1)
storage/src/mmr/benches/update.rs:21
- [nitpick] The variable 'h' is redefined on line 21, which may cause ambiguity. Consider renaming one of these variables (e.g., original_hasher and wrapped_hasher) for improved clarity.
let mut h = Standard::new(&mut h);
07613fc
to
58c2f6c
Compare
58c2f6c
to
5128467
Compare
storage/src/mmr/benches/update.rs
Outdated
/// Benchmark the performance of randomly updating leaves in an MMR. | ||
fn bench_update(c: &mut Criterion) { | ||
let cfg = Config::default(); | ||
let runner = tokio::Runner::new(cfg.clone()); |
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.
I don't think you need a clone on cfg here?
(Reviewing on mobile and apologize if I'm missing a line)
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.
correct, removed.
5128467
to
ba0ab87
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #1001 +/- ##
=======================================
Coverage 90.79% 90.79%
=======================================
Files 190 190
Lines 52630 52632 +2
=======================================
+ Hits 47787 47789 +2
Misses 4843 4843 see 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
No description provided.