refactor: move benchmarks to separate crate#148
Merged
ChunxuTang merged 1 commit intolance-format:mainfrom Mar 5, 2026
Merged
Conversation
Move benchmarks from lance-graph to a new lance-graph-benches crate to exclude them from release binaries and reduce build times. Changes: - Create new crate: lance-graph-benches (publish = false) - Move graph_execution benchmark to new crate - Remove benchmark-only dependencies from lance-graph: - criterion (benchmarking framework) - lance-index (unused) - Update workspace to include lance-graph-benches - Add README for benchmark crate Benefits: - Smaller release binaries (benchmark code excluded) - Faster production builds (benchmarks only built when needed) - Cleaner separation of concerns - All existing tests still pass (295 tests) Usage: cargo bench -p lance-graph-benches Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41e62a5 to
a31e4cd
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ChunxuTang
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves benchmarks from
lance-graphto a newlance-graph-benchescrate to exclude them from release binaries and reduce build times for production code.Changes
New Crate:
lance-graph-benchespublish = falsegraph_executionbenchmark fromlance-graphCleaned Up
lance-graphcriterion(benchmarking framework)lance-index(unused)tempfile(used by tests)lance-arrow(used by tests)tokio,futures(used by tests)[[bench]]section from Cargo.tomlWorkspace
lance-graph-benchesto workspace membersBenefits
✅ Smaller Release Binaries - Benchmark code excluded from published crates
✅ Faster Production Builds - Benchmarks only compiled when explicitly requested
✅ Cleaner Separation - Dev/benchmark code separate from production code
✅ All Tests Pass - 295 unit tests still passing
✅ Benchmarks Work - Verified compilation and structure
Usage
Testing
cargo check -p lance-graph- successcargo build -p lance-graph- successcargo test -p lance-graph --lib- 295 tests passcargo check -p lance-graph-benches- successFile Structure
This follows the common Rust pattern of separating benchmarks into dedicated crates when they have heavy dependencies or shouldn't be included in releases.