Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## November 2026: parser refresh, build cost, and allocation pressure

- Benchmarked parser versions: sqlparser-rs 0.64 (git 8a176d98), pg_query.rs 18.1.0 on libpg_query 18 (git 20f3a182), polyglot-sql 0.14.1 (git 866e97bd), qusql-parse 0.12, sqlglot-rust 0.11.1, turso_parser 0.8.3, with databend-common-ast 0.2.5 and sqlite3-parser 0.17 already at their newest releases.
- The time machine gains seven release points (sqlparser-rs 0.64, polyglot-sql 0.12.1, 0.13.5 and 0.14.1, sqlglot-rust 0.11.1, qusql-parse 0.12, turso_parser 0.8.3) for 102 versions in total, and the sqlglot-rust 0.10 milestone moves to 0.10.33.
- pg_query 18 takes explicit parser and deparse options. The benchmark passes `ParserOptions::DEFAULT` and `DeparseOptions::default()`, the standard grammar and plain deparse.
- Build cost: every benchmarked release, current and historical, is compiled as a minimal stdin-parse program from a clean target directory with the workspace lockfile. The site reports CPU seconds of the whole build, wall seconds at a fixed job count, the parser crate's own compile time, the number of crates compiled, and the stripped binary size the parser adds, on the overview, the parser pages, and the time-machine trends.
- Allocation pressure: the counting allocator also records allocator calls and bytes requested per statement, freed or not, next to peak and retained memory, in the dialect and parser tables, the batch figures, and the time-machine trends.
- The counting allocator lives once in `src/mem.rs`, shared by both memory benches, and the workspace no longer forbids `unsafe` code.

## September 2026: parser refresh

- Updated the benchmarked parsers to their latest versions: sqlparser-rs 0.62 to 0.63 (git 9296011a), polyglot-sql 0.5.1 to 0.11.0 (git 47342ba6), pg_query.rs 6.1.1 to 6.2.0 (git 0e382742), qusql-parse 0.8 to 0.11, sqlglot-rust 0.10.1 to 0.10.29, sqlite3-parser 0.16 to 0.17, turso_parser 0.6.1 to 0.7.2. databend-common-ast and orql were already at their newest releases.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cargo fmt --all
cargo clippy --all-targets
```

No unsafe code is allowed (`unsafe_code = "forbid"`). Clippy runs with pedantic and nursery lints enabled. The workspace has three crates: the native benchmark (root), `viz` (wasm-clean shared schema + plotters chart renderers), and `web` (the Dioxus viewer). `default-members` keeps bare `cargo test`/`bench`/`clippy` on the native crate only.
Clippy runs with pedantic and nursery lints enabled. The only `unsafe` is the counting global allocator in `src/mem.rs`, installed by the memory benches. The workspace has three crates: the native benchmark (root), `viz` (wasm-clean shared schema + plotters chart renderers), and `web` (the Dioxus viewer). `default-members` keeps bare `cargo test`/`bench`/`clippy` on the native crate only.

## Results website

Expand Down
9 changes: 3 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ categories = ["development-tools::profiling"]
publish = false
rust-version.workspace = true

[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
all = "warn"
pedantic = "warn"
Expand All @@ -36,12 +33,12 @@ cast_sign_loss = { level = "allow", priority = 1 }
sqlparser = { git = "https://github.com/sqlparser-rs/sqlparser-rs" }
# libpg_query, the PostgreSQL server's own parser, the reference for PostgreSQL.
pg_query = { git = "https://github.com/pganalyze/pg_query.rs" }
qusql-parse = "0.11.0"
qusql-parse = "0.12.0"
polyglot-sql = { git = "https://github.com/tobilg/polyglot" }
databend-common-ast = "0.2.5"
sqlglot-rust = "0.10.29"
sqlglot-rust = "0.11.1"
sqlite3-parser = "0.17.0"
turso_parser = "0.7.2"
turso_parser = "0.8.3"
fallible-iterator = "0.3.0"
viz = { path = "viz" }
serde = { version = "1", features = ["derive"] }
Expand Down
21 changes: 11 additions & 10 deletions README.md

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions featurescan/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "featurescan"
version = "0.1.0"
edition = "2021"
description = "Static source-feature scan of the benchmarked SQL parsers (panic discipline, unsafe, lint policy)"
description = "Static source-feature scan and build-cost measurement of the benchmarked SQL parsers (panic discipline, unsafe, lint policy, compile cost)"
license = "MIT"
publish = false
rust-version.workspace = true
Expand All @@ -13,7 +13,10 @@ default-run = "featurescan"
# `src/` with `syn`, and records panic-inducing constructs, unsafe usage, and the
# crate's own lint policy. The committed result (featurescan/data/featurescan.json)
# is baked into the web metadata, so the wasm build stays free of network access.
# Not a default workspace member, so `cargo build` never pulls these deps.
# The build-cost bin (`featurescan-build`) compiles a minimal probe per parser
# release in a scratch crate under `target/buildscan/` and writes
# `featurescan/data/build.json`. Not a default workspace member, so `cargo build`
# never pulls these deps.

[dependencies]
cargo_metadata = "0.19"
Expand All @@ -40,3 +43,7 @@ path = "src/main.rs"
[[bin]]
name = "featurescan-depth"
path = "src/depth.rs"

[[bin]]
name = "featurescan-build"
path = "src/build.rs"
7 changes: 7 additions & 0 deletions featurescan/data/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"note": "",
"rustc": "",
"jobs": 8,
"baseline_bytes": 0,
"entries": []
}
Loading
Loading