Skip to content

Commit bd6fd36

Browse files
refactor: move benchmarks to a new crate
1 parent 50d5667 commit bd6fd36

File tree

12 files changed

+44
-25
lines changed

12 files changed

+44
-25
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = ["crates/powers-of-tau-util", "crates/proof-of-sql", "crates/proof-of-sql-parser", "crates/proof-of-sql-planner"]
3+
members = ["crates/powers-of-tau-util", "crates/proof-of-sql", "crates/proof-of-sql-benches", "crates/proof-of-sql-parser", "crates/proof-of-sql-planner"]
44

55
[workspace.package]
66
edition = "2021"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[package]
2+
name = "proof-of-sql-benches"
3+
edition.workspace = true
4+
exclude.workspace = true
5+
repository.workspace = true
6+
version.workspace = true
7+
license-file.workspace = true
8+
9+
[dependencies]
10+
ark-serialize = { version = "0.5.0" }
11+
ark-std = { version = "0.5.0", default-features = false }
12+
blitzar = { version = "4.3.0" }
13+
bumpalo = { version = "3.11.0" }
14+
clap = { version = "4.5.4", features = ["derive", "env"] }
15+
criterion = { version = "0.5.1", features = ["html_reports"] }
16+
csv = { version = "1.3.1" }
17+
curve25519-dalek = { version = "4", features = ["rand_core"] }
18+
ff = { version = "0.13.0"}
19+
halo2curves = { version = "0.8.0", default-features = false }
20+
indexmap = { version = "2.8", default-features = false }
21+
nova-snark = { version = "0.41.0" }
22+
opentelemetry = { version = "0.23.0" }
23+
opentelemetry-jaeger = { version = "0.20.0" }
24+
proof-of-sql = { path = "../proof-of-sql", default-features = false, features = ["arrow", "hyperkzg_proof"] }
25+
rand = { version = "0.8", default-features = false }
26+
sqlparser = { version = "0.45.0", default-features = false }
27+
tracing = { version = "0.1.36", default-features = false }
28+
tracing-opentelemetry = { version = "0.22.0" }
29+
tracing-subscriber = { version = "0.3.0", features = ["env-filter"] }
30+
31+
[lints]
32+
workspace = true
33+
34+
[[bench]]
35+
name = "bench_append_rows"
36+
harness = false

crates/proof-of-sql/benches/README.md renamed to crates/proof-of-sql-benches/src/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ The Jaeger benchmarks/tracing is wrapped by a binary. The motivation of the wrap
1010
```
1111
2. See all the options to run a benchmark.
1212
```bash
13-
cargo run --release --bin jaeger_benches --features="bench" -- --help
13+
cargo run --release --bin proof-of-sql-benches -- --help
1414
```
1515
3. Navigate to http://localhost:16686/ to see the results.
1616
4. To end the Jaeger service, run
1717
```bash
1818
docker kill jaeger
1919
```
2020

21-
All the options are outlined in the help and `jaeger_benches.rs` module.
21+
All the options are outlined in the help and `main.rs` module.
2222

2323
### Example
2424

2525
To run a benchmark on the `HyperKZG` commitment scheme using the `Single Column Filter` query with a table size of `1_000_000` for `3` iterations, your command would be the following.
2626

2727
```bash
28-
cargo run --release --bin jaeger_benches --features="bench" -- --s hyper-kzg -i 3 -t 1000000 -q single-column-filter
28+
cargo run --release --bin proof-of-sql-benches -- --s hyper-kzg -i 3 -t 1000000 -q single-column-filter
2929
```
3030

3131
### Memory logging (optional)
@@ -34,7 +34,7 @@ Jaeger benchmarks default to logging any traces at `DEBUG` level and above. Memo
3434

3535
Example
3636
```
37-
RUST_LOG=trace cargo bench -p proof-of-sql --bench jaeger_benches DynamicDory
37+
RUST_LOG=trace cargo run --release --bin proof-of-sql-benches
3838
```
3939
4040
## Criterion benchmarking
@@ -43,6 +43,6 @@ To run benchmarks with Criterion, you need to do the following
4343
4444
1. Run the benchmarks. (Warning: this takes a very long time.)
4545
```bash
46-
cargo bench -p proof-of-sql --bench bench_append_rows --features="test"
46+
cargo bench -p proof-of-sql-benches --bench bench_append_rows --features="test"
4747
```
4848
2. Navigate to `target/criterion/report/index.html` to see the results.

crates/proof-of-sql/benches/jaeger/bin/jaeger_benches.rs renamed to crates/proof-of-sql-benches/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//! To run, execute the following commands:
44
//! ```bash
55
//! docker run --rm -d --name jaeger -p 6831:6831/udp -p 16686:16686 jaegertracing/all-in-one:1.62.0
6-
//! cargo run --release --bin jaeger_benches --features="bench" -- --help
6+
//! cargo run --release --bin proof-of-sql-benches -- --help
77
//! ```
88
//! Then, navigate to <http://localhost:16686> to view the traces.
99
//!

0 commit comments

Comments
 (0)