Skip to content

Conversation

roberto-bayardo
Copy link
Collaborator

The benchmark creates a large-ish random DB, closes it, then times how long it takes to re-open.

@roberto-bayardo roberto-bayardo requested a review from Copilot June 18, 2025 14:07
Copy link
Contributor

@Copilot 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

Adds a Criterion benchmark that measures the startup time of an adb::any database by generating a large random DB and timing reopen operations.

  • Introduces a new bench harness (bench.rs) for adb/any.
  • Implements random-data generation and initialization timing in anydb_init.rs.
  • Adjusts snapshot read buffer size in any.rs.
  • Registers the new benchmark in storage/Cargo.toml.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
storage/src/adb/benches/bench.rs Adds criterion_main! entry for anydb_init::benches.
storage/src/adb/benches/anydb_init.rs Implements generation of a large random DB and async benchmark for init timing.
storage/src/adb/any.rs Increases SNAPSHOT_READ_BUFFER_SIZE from 64KiB to 128KiB.
storage/Cargo.toml Registers a new bench target named adb.

@roberto-bayardo roberto-bayardo force-pushed the anydb-startup-bench branch 2 times, most recently from c0b47da to ea7ba7d Compare June 18, 2025 14:20
@roberto-bayardo roberto-bayardo marked this pull request as ready for review June 18, 2025 15:04
@roberto-bayardo roberto-bayardo force-pushed the anydb-startup-bench branch 3 times, most recently from 1f5971a to 41e40ab Compare June 18, 2025 16:05
@patrick-ogrady patrick-ogrady merged commit 1fa1039 into main Jun 18, 2025
15 checks passed
@patrick-ogrady patrick-ogrady deleted the anydb-startup-bench branch June 18, 2025 16:32
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.98%. Comparing base (54eedf7) to head (21cf3ec).
Report is 3 commits behind head on main.

@@            Coverage Diff             @@
##             main    #1121      +/-   ##
==========================================
- Coverage   91.01%   90.98%   -0.04%     
==========================================
  Files         191      214      +23     
  Lines       55231    57430    +2199     
==========================================
+ Hits        50270    52253    +1983     
- Misses       4961     5177     +216     

see 67 files 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 54eedf7...21cf3ec. 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