diff --git a/Cargo.lock b/Cargo.lock index 4670bee0..29add1d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4084,7 +4084,6 @@ dependencies = [ "arrow-array", "arrow-schema", "async-trait", - "criterion", "datafusion", "datafusion-common", "datafusion-expr", @@ -4095,7 +4094,6 @@ dependencies = [ "lance", "lance-arrow", "lance-graph-catalog", - "lance-index", "lance-linalg", "lance-namespace", "nom 7.1.3", @@ -4107,6 +4105,20 @@ dependencies = [ "url", ] +[[package]] +name = "lance-graph-benches" +version = "0.1.0" +dependencies = [ + "arrow-array", + "arrow-schema", + "criterion", + "futures", + "lance", + "lance-graph", + "tempfile", + "tokio", +] + [[package]] name = "lance-graph-catalog" version = "0.5.3" diff --git a/Cargo.toml b/Cargo.toml index c8d726e2..c66043bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,5 +3,6 @@ members = [ "crates/lance-graph", "crates/lance-graph-catalog", "crates/lance-graph-python", + "crates/lance-graph-benches", ] resolver = "2" diff --git a/crates/lance-graph-benches/Cargo.toml b/crates/lance-graph-benches/Cargo.toml new file mode 100644 index 00000000..c8c74d51 --- /dev/null +++ b/crates/lance-graph-benches/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "lance-graph-benches" +version = "0.1.0" +edition = "2021" +publish = false +description = "Benchmarks for lance-graph (not published)" + +[dependencies] +lance-graph = { path = "../lance-graph", version = "0.5.3" } +lance = "1.0.0" +arrow-array = "56.2" +arrow-schema = "56.2" +criterion = { version = "0.5", features = ["async", "async_tokio", "html_reports"] } +futures = "0.3" +tempfile = "3" +tokio = { version = "1.37", features = ["macros", "rt-multi-thread"] } + +[[bench]] +name = "graph_execution" +harness = false diff --git a/crates/lance-graph-benches/README.md b/crates/lance-graph-benches/README.md new file mode 100644 index 00000000..ce63a572 --- /dev/null +++ b/crates/lance-graph-benches/README.md @@ -0,0 +1,28 @@ +# Lance Graph Benchmarks + +Performance benchmarks for the `lance-graph` crate. + +## Running Benchmarks + +From the repository root: + +```bash +# Run all benchmarks +cargo bench -p lance-graph-benches + +# Run specific benchmark +cargo bench -p lance-graph-benches --bench graph_execution +``` + +## Benchmarks + +- **graph_execution**: End-to-end query execution benchmarks + - Basic node filtering and projection + - Single-hop relationship expansion + - Two-hop relationship expansion + - Tests with datasets of varying sizes (100, 10K, 1M rows) + +## Note + +This crate is not published to crates.io and is excluded from releases. +It exists solely for performance testing during development. diff --git a/crates/lance-graph/benches/graph_execution.rs b/crates/lance-graph-benches/benches/graph_execution.rs similarity index 100% rename from crates/lance-graph/benches/graph_execution.rs rename to crates/lance-graph-benches/benches/graph_execution.rs diff --git a/crates/lance-graph/Cargo.toml b/crates/lance-graph/Cargo.toml index 716a0888..f908239b 100644 --- a/crates/lance-graph/Cargo.toml +++ b/crates/lance-graph/Cargo.toml @@ -47,13 +47,7 @@ unity-catalog = ["lance-graph-catalog/unity-catalog"] delta = ["dep:deltalake", "dep:url"] [dev-dependencies] -criterion = { version = "0.5", features = ["async", "async_tokio", "html_reports"] } futures = "0.3" lance-arrow = "1.0.0" -lance-index = "1.0.0" tempfile = "3" tokio = { version = "1.37", features = ["macros", "rt-multi-thread"] } - -[[bench]] -name = "graph_execution" -harness = false