[storage/archive] Add Benchmarks#845
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces benchmarks for Archive operations and removes legacy hashmap benchmarks to better gauge performance under various configurations. Key changes include:
- Adding a new destroy() method in the storage module to remove on-disk data.
- Introducing benchmark utilities and new benchmarks for restart, put, sequential index lookup, random key lookup, and random index lookup.
- Removing outdated hashmap benchmark files.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| storage/src/archive/storage.rs | Added a destroy() function for cleaning up on-disk data. |
| storage/src/archive/benches/utils.rs | Added utility functions and type aliases for benchmarks. |
| storage/src/archive/benches/restart.rs | Introduced a benchmark measuring Archive initialization. |
| storage/src/archive/benches/put.rs | Added a benchmark for testing Archive put performance. |
| storage/src/archive/benches/get_sequential_index.rs | Added a sequential index lookup benchmark for Archive. |
| storage/src/archive/benches/get_random_key.rs | Added a benchmark for random key-based Archive lookups. |
| storage/src/archive/benches/get_random_index.rs | Added a benchmark for random index-based Archive lookups. |
| storage/src/archive/benches/bench.rs | Updated the benchmark module grouping to reflect new files. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a comprehensive suite of benchmarks for the Archive component, as well as a new destroy function to remove all on-disk data. Key changes include:
- Adding the destroy method in storage/src/archive/storage.rs.
- Introducing new benchmark modules (put, restart, get_sequential_index, get_random_key, get_random_index) along with shared utilities.
- Removing legacy hashmap benchmark files in favor of more relevant benchmarks.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| storage/src/archive/storage.rs | Adds the destroy method to allow archive cleanup |
| storage/src/archive/benches/utils.rs | Provides utility functions for Archive benchmarks |
| storage/src/archive/benches/restart.rs | Implements benchmarks for Archive restart scenarios |
| storage/src/archive/benches/put.rs | Benchmarks archive write performance |
| storage/src/archive/benches/get_sequential_index.rs | Benchmarks sequential index lookup |
| storage/src/archive/benches/get_random_key.rs | Benchmarks random key lookup with both serial and concurrent modes |
| storage/src/archive/benches/get_random_index.rs | Benchmarks random index lookup with both serial and concurrent modes |
| storage/src/archive/benches/bench.rs | Updates benchmark module inclusions, removing legacy tests |
There was a problem hiding this comment.
Pull Request Overview
This PR adds new benchmark suites for both the index and archive modules while also introducing a new API to clean up on‐disk data. Key changes include:
- Adding benchmark registration for index and archive modules.
- Introducing a new Archive::destroy method for cleaning up on‐disk artifacts.
- Implementing three new benchmark suites (get, put, restart) along with shared benchmark utilities.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| storage/src/index/benches/bench.rs | Registers index benchmark modules using criterion_main. |
| storage/src/archive/storage.rs | Adds the destroy method to allow removal of on-disk archive data. |
| storage/src/archive/benches/utils.rs | Provides shared utilities for archive benchmarks. |
| storage/src/archive/benches/restart.rs | Implements the restart benchmark suite for the archive. |
| storage/src/archive/benches/put.rs | Implements the put benchmark suite. |
| storage/src/archive/benches/get.rs | Implements the get benchmark suite with both serial and concurrent modes. |
| storage/src/archive/benches/bench.rs | Updates benchmark module registration for the archive suite. |
| storage/Cargo.toml | Adds a new bench entry for index benchmarks. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a suite of benchmarks for archive storage operations to help measure performance for various scenarios such as get, put, and restart. It also introduces a new Archive::destroy method to remove on-disk data and updates Cargo.toml to include the new benchmark configuration.
- Introduced benchmark modules (get, put, restart) along with supporting utilities.
- Added Archive::destroy to enable cleanup of on-disk data.
- Updated Cargo.toml to register a new bench target.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| storage/src/index/benches/bench.rs | Updated to include new benchmark modules (get, put, restart, utils). |
| storage/src/archive/storage.rs | Added the destroy() method for removing on-disk archive data. |
| storage/src/archive/benches/utils.rs | Provides common helpers for archive benchmarks including archive setup. |
| storage/src/archive/benches/restart.rs | Implements benchmarks for archive restart performance. |
| storage/src/archive/benches/put.rs | Implements benchmarks for put operations into the archive. |
| storage/src/archive/benches/get.rs | Implements benchmarks for get (random key lookup) operations. |
| storage/Cargo.toml | Added a new bench configuration for the index benchmark target. |
|
Tested all benchmarks locally 👍 |
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #845 +/- ##
=======================================
Coverage 89.41% 89.41%
=======================================
Files 167 167
Lines 41686 41689 +3
=======================================
+ Hits 37274 37277 +3
Misses 4412 4412
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
No description provided.