-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathCargo.toml
More file actions
88 lines (74 loc) · 3.4 KB
/
Copy pathCargo.toml
File metadata and controls
88 lines (74 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
[package]
# SQLR-4 / SQLR-16 — benchmark suite for SQLRite vs SQLite (and friends).
# See `docs/benchmarks-plan.md` for the canonical design + decisions.
#
# Not published to crates.io. Not built by default in CI — the engine's
# `rust-build-and-test` job carries an `--exclude sqlrite-benchmarks`
# alongside `sqlrite-desktop` because criterion benches don't make sense
# in CI (noisy on shared runners) and the heavy `rusqlite[bundled]`
# build is also undesirable on every PR.
#
# Run locally with `make bench` (lean: SQLRite + SQLite only) or
# `make bench-duckdb` (adds the optional DuckDB driver for Group B).
name = "sqlrite-benchmarks"
version = "0.0.0"
authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
edition = "2024"
rust-version = "1.85"
publish = false
description = "Benchmark suite — SQLRite vs SQLite (and friends). Not for crates.io."
license = "MIT"
[lib]
name = "sqlrite_benchmarks"
path = "src/lib.rs"
# Aggregator binary — walks `target/criterion/` after `cargo bench` and
# emits a single results JSON file under `benchmarks/results/`. Run via
# `scripts/run.sh` (which `make bench` invokes); not for direct use.
[[bin]]
name = "aggregate"
path = "src/bin/aggregate.rs"
# Single criterion entry point. Fans out (workload × driver) pairs via
# the `Driver` trait. Adding a workload = one file in `src/workloads/`
# + one register-call in this entry point.
[[bench]]
name = "suite"
path = "benches/suite.rs"
harness = false
[features]
default = []
# Optional DuckDB driver (Group B only — W7 / W8 / W9). Heavy dep
# (~50 MB compiled), so kept off by default. `make bench-duckdb`
# enables it; the regular `make bench` stays lean.
duckdb = ["dep:duckdb"]
[dependencies]
# The engine. Default features off (no rustyline / clap / `ask`), but
# `file-locks` is on so the comparison runs the same lock-acquisition
# path that any real SQLRite consumer pays.
sqlrite = { package = "sqlrite-engine", path = "..", version = "0.14.0", default-features = false, features = ["file-locks"] }
# SQLite via rusqlite, with `bundled` so the comparison is against a
# known SQLite version (not whatever happens to be on the host).
# `extra_check` and `column_decltype` would be nice-to-have but cost
# binary size; skipping until a workload needs them.
rusqlite = { version = "0.36", features = ["bundled"] }
# DuckDB via duckdb-rs (optional, feature-gated). `bundled` for the
# same reason as rusqlite — pin a known DuckDB version.
duckdb = { version = "1.4", features = ["bundled"], optional = true }
# Criterion for the actual measurement loop. v0.5 ships HDR-style
# sampling, statistical confidence intervals, and JSON output to
# `target/criterion/` that the `aggregate` binary harvests.
criterion = { version = "0.5", default-features = false, features = ["plotters", "cargo_bench_support"] }
# Deterministic data generation (Q8: workloads versioned; the seed is
# part of the workload's contract so v1 inputs reproduce byte-for-byte).
rand = "0.8"
rand_chacha = "0.3"
# JSON envelope for `benchmarks/results/*.json`.
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Per-run temp dirs so each iteration starts from a clean DB file.
# Prevents page-cache / WAL-state bleed across runs.
tempfile = "3"
# Anyhow for driver-level error reporting. The bench harness is
# end-user code; we don't need to surface a typed error ladder.
anyhow = "1"
# Walk `target/criterion/` for the aggregator binary.
walkdir = "2"