Skip to content

[storage/archive] Add Benchmarks#845

Merged
patrick-ogrady merged 30 commits into
mainfrom
add-archive-benchmarks
Apr 26, 2025
Merged

[storage/archive] Add Benchmarks#845
patrick-ogrady merged 30 commits into
mainfrom
add-archive-benchmarks

Conversation

@patrick-ogrady
Copy link
Copy Markdown
Contributor

No description provided.

@patrick-ogrady patrick-ogrady requested a review from Copilot April 26, 2025 21:05
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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.

@patrick-ogrady patrick-ogrady requested a review from Copilot April 26, 2025 21:15
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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

@patrick-ogrady patrick-ogrady requested a review from Copilot April 26, 2025 22:09
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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.

Comment thread storage/src/archive/benches/get.rs Outdated
Comment thread storage/src/archive/benches/get.rs Outdated
@patrick-ogrady patrick-ogrady requested a review from Copilot April 26, 2025 22:10
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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.

@patrick-ogrady
Copy link
Copy Markdown
Contributor Author

Tested all benchmarks locally 👍

@patrick-ogrady patrick-ogrady merged commit bfa4f8f into main Apr 26, 2025
7 checks passed
@patrick-ogrady patrick-ogrady deleted the add-archive-benchmarks branch April 26, 2025 22:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.41%. Comparing base (8adf7d3) to head (1658528).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
storage/src/archive/storage.rs 0.00% 3 Missing ⚠️
@@           Coverage Diff           @@
##             main     #845   +/-   ##
=======================================
  Coverage   89.41%   89.41%           
=======================================
  Files         167      167           
  Lines       41686    41689    +3     
=======================================
+ Hits        37274    37277    +3     
  Misses       4412     4412           
Files with missing lines Coverage Δ
storage/src/archive/storage.rs 97.58% <0.00%> (-1.20%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8adf7d3...1658528. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants