Remove/update benchmarks#288
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 41 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRemoved three explicit benchmark targets from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@benches/merge.rs`:
- Around line 9-11: The benchmark creates multiple Memtable instances with the
same ID (Memtable::new(0_u64)), violating the MemtableId uniqueness invariant;
change both maps that build memtables (the one assigning to variable memtables
and the second similar loop around lines 44-46) to supply distinct IDs (e.g.,
Memtable::new(i as u64) or a running counter) so each Memtable gets a unique
MemtableId instead of 0.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6174fb24-ebc3-42d0-b6e0-4e6357f59838
📒 Files selected for processing (7)
Cargo.tomlbenches/bloom.rsbenches/level_manifest.rsbenches/memtable.rsbenches/merge.rsbenches/partition_point.rsbenches/tli.rs
💤 Files with no reviewable changes (4)
- benches/bloom.rs
- Cargo.toml
- benches/tli.rs
- benches/partition_point.rs
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@benches/tree.rs`:
- Around line 16-23: The TempDir guard is being moved into Config::new which
drops the guard before .open() runs; update each Config::new call (e.g., the one
shown and the other setup blocks) to pass the Path reference instead of the
TempDir by using path.path() or folder.path() so Config::new receives a path
slice. Search for all Config::new(...) occurrences in benches/tree.rs (lines
around the shown blocks and the other listed blocks) and replace the first
argument from the TempDir variable (path or folder) to path.path() /
folder.path(); leave the rest of the call (SequenceNumberCounter::default(),
.use_cache(...), .open().unwrap()) unchanged.
- Around line 404-420: The benchmark inserts a large value into the tree but
doesn't flush, so the timed "blob tree get" measures memtable lookup rather than
blob storage; before starting the c.bench_function closure call the tree's flush
method (e.g., invoke tree.flush and handle/unpack its Result) to persist the
blob to storage, ensure the flush completed successfully, then run the timed
b.iter to measure blob read performance; reference:
Config::new/...with_kv_separation, tree.insert, and the "blob tree get" bench.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5cc8da96-9e93-40dd-bc2a-7bd8bda42042
📒 Files selected for processing (3)
Cargo.tomlbenches/block.rsbenches/tree.rs
💤 Files with no reviewable changes (2)
- benches/block.rs
- Cargo.toml
| assert_eq!(levels.iter().count(), segment_count as usize); | ||
| assert_eq!(tree.table_count(), segment_count as usize); |
There was a problem hiding this comment.
levels.iter().count() was a very deliberate choice to force iterating the segments. count() is used to consume the entire iterator. table_count() obviously is an O(1) operation and masks the purpose of the benchmark.
There was a problem hiding this comment.
I think though this file can be removed for now
The benchmarks were outdated and did not compile. This PR aims to update or remove the benchmarks.
Summary by CodeRabbit