@@ -125,6 +125,41 @@ Most APIs return `Result<T, GraphError>`. Errors include parsing failures, missi
125125cargo test -p lance-graph
126126```
127127
128+ ## Benchmarks
129+
130+ - ** Requirements** :
131+ - ** protoc** : install ` protobuf-compiler ` (Debian/Ubuntu: ` sudo apt-get install -y protobuf-compiler ` ).
132+ - Optional: ** gnuplot** for Criterion's gnuplot backend; otherwise the plotters backend is used.
133+
134+ - ** Run** (from ` rust/lance-graph ` ):
135+
136+ ``` bash
137+ cargo bench --bench graph_execution
138+
139+ # Quicker local run (shorter warm-up/measurement):
140+ cargo bench --bench graph_execution -- --warm-up-time 1 --measurement-time 2 --sample-size 10
141+ ```
142+
143+ - ** Reports** :
144+ - Global index: ` rust/lance-graph/target/criterion/report/index.html `
145+ - Group index: ` rust/lance-graph/target/criterion/cypher_execution/report/index.html `
146+
147+ - ** Typical results** (x86_64, quick run: warm-up 1s, measurement 2s, sample size 10):
148+
149+ | Benchmark | Size | Median time | Approx. throughput |
150+ | -------------------------------------| -----------| -------------| --------------------|
151+ | ` basic_node_filter ` | 100 | ~ 680 µs | ~ 147 Kelem/s |
152+ | ` basic_node_filter ` | 10,000 | ~ 715 µs | ~ 13.98 Melem/s |
153+ | ` basic_node_filter ` | 1,000,000 | ~ 743 µs | ~ 1.35 Gelem/s |
154+ | ` single_hop_expand ` | 100 | ~ 2.79 ms | ~ 35.9 Kelem/s |
155+ | ` single_hop_expand ` | 10,000 | ~ 3.77 ms | ~ 2.65 Melem/s |
156+ | ` single_hop_expand ` | 1,000,000 | ~ 3.70 ms | ~ 270 Melem/s |
157+ | ` two_hop_expand ` | 100 | ~ 4.52 ms | ~ 22.1 Kelem/s |
158+ | ` two_hop_expand ` | 10,000 | ~ 6.41 ms | ~ 1.56 Melem/s |
159+ | ` two_hop_expand ` | 1,000,000 | ~ 6.16 ms | ~ 162 Melem/s |
160+
161+ Numbers are illustrative; your hardware, compiler, and runtime load will affect results.
162+
128163## Python Bindings
129164
130165Python bindings for this crate live under ` python/src/graph.rs ` and expose the same configuration and query APIs via PyO3.
0 commit comments