diff --git a/Cargo.lock b/Cargo.lock index 1a8c4fc..5fbbdc0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -831,7 +831,7 @@ dependencies = [ [[package]] name = "decentdb" -version = "2.10.0" +version = "2.11.0" dependencies = [ "base64 0.22.1", "chacha20", @@ -867,7 +867,7 @@ dependencies = [ [[package]] name = "decentdb-benchmark" -version = "2.10.0" +version = "2.11.0" dependencies = [ "anyhow", "clap", @@ -881,7 +881,7 @@ dependencies = [ [[package]] name = "decentdb-cli" -version = "2.10.0" +version = "2.11.0" dependencies = [ "anyhow", "clap", @@ -895,7 +895,7 @@ dependencies = [ [[package]] name = "decentdb-migrate" -version = "2.10.0" +version = "2.11.0" dependencies = [ "anyhow", "clap", @@ -1859,7 +1859,7 @@ dependencies = [ [[package]] name = "libpg_query_sys" -version = "2.10.0" +version = "2.11.0" dependencies = [ "pg_query", ] diff --git a/Cargo.toml b/Cargo.toml index 6ebd5a6..de1b6e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ exclude = [ resolver = "2" [workspace.package] -version = "2.10.0" +version = "2.11.0" edition = "2021" authors = ["Steven Hildreth"] license = "Apache-2.0" diff --git a/README.md b/README.md index 6735364..b9a1e22 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ It preserves a **one writer** and **many concurrent readers** concurrency model - ⚡ **Triggers** - AFTER and INSTEAD OF triggers for complex logic - 💾 **Savepoints** - Nested transaction control with SAVEPOINT, RELEASE, and ROLLBACK TO - 🧠 **In-Memory Database** - Ephemeral `:memory:` databases for caching and testing, with `save-as` (CLI) / `saveAs` (embedded API) to snapshot to disk -- 📦 **Single-file DB + WAL sidecar** - Primary `.ddb` file with a `-wal` sidecar log for durability +- 📦 **Single-file DB + WAL sidecar** - Primary `.ddb` file with an append-`.wal` sidecar log for durability - 🌐 **Cross-Platform** - Native release builds for Linux x86_64/arm64 (including 64-bit Raspberry Pi OS), macOS, and Windows - 🚀 **Bulk Load Operations** - Optimized high-performance data loading - 🛠️ **Rich CLI Tool** - Unified command-line interface for all database operations @@ -112,6 +112,12 @@ It preserves a **one writer** and **many concurrent readers** concurrency model README chart would show a severe tuned-profile drop while the raw engine baseline remains healthy, the workflow fails instead of committing confusing assets. +- For manual engine diagnostics, `benchmarks/rust-baseline` supports + `--benchmark` to run `smoke`, `medium`, `full`, and `huge` scales in order + for one engine/profile and then generate its HTML report. That runner now + measures read queries from a checkpointed post-load state for both DecentDB + and SQLite, with `checkpoint_after_seed` recording WAL/database bytes before + and after checkpointing. - SQLite results are reported as `sqlite_wal_full` (WAL+FULL sync); relaxed durability variants can be added as separate profiles when collected. - Chart values are **normalized vs SQLite** (baseline = 1.0), and the charted metric set is the full native set collected in the benchmark JSON: - `read_p95_ms`, `join_p95_ms`, `range_scan_p95_ms`, `aggregate_p95_ms`, `concurrent_read_p95_ms`, `commit_p95_ms`, `insert_rows_per_sec`. @@ -134,6 +140,11 @@ python scripts/aggregate_benchmarks.py \ # Render the README chart assets from the merged summary python scripts/make_readme_chart.py python scripts/visualize_alternative.py + +# Optional raw engine diagnostic suite and HTML report +cd benchmarks/rust-baseline +cargo run --release -- --engine decentdb --benchmark --out-dir ../../.tmp/rust-baseline/results +cargo run --release -- --engine sqlite --benchmark --out-dir ../../.tmp/rust-baseline/results ``` ## Quick Start diff --git a/VERSION b/VERSION index 10c2c0c..46b81d8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.10.0 +2.11.0 diff --git a/benchmarks/rust-baseline/Cargo.lock b/benchmarks/rust-baseline/Cargo.lock index 3653352..6b8ff6f 100644 --- a/benchmarks/rust-baseline/Cargo.lock +++ b/benchmarks/rust-baseline/Cargo.lock @@ -8,6 +8,18 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" version = "1.1.4" @@ -336,7 +348,7 @@ dependencies = [ [[package]] name = "decentdb" -version = "2.10.0" +version = "2.11.0" dependencies = [ "base64", "chacha20", @@ -368,6 +380,7 @@ dependencies = [ "anyhow", "clap", "decentdb", + "rusqlite", "serde", "serde_json", ] @@ -438,6 +451,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fastrand" version = "2.4.1" @@ -526,6 +551,15 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + [[package]] name = "hashbrown" version = "0.15.5" @@ -541,6 +575,15 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + [[package]] name = "heck" version = "0.5.0" @@ -683,11 +726,21 @@ dependencies = [ [[package]] name = "libpg_query_sys" -version = "2.10.0" +version = "2.11.0" dependencies = [ "pg_query", ] +[[package]] +name = "libsqlite3-sys" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +dependencies = [ + "pkg-config", + "vcpkg", +] + [[package]] name = "linux-raw-sys" version = "0.4.15" @@ -1040,6 +1093,20 @@ version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +[[package]] +name = "rusqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "rustc-hash" version = "1.1.0" @@ -1340,6 +1407,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" @@ -1714,6 +1787,26 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "zerocopy" +version = "0.8.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zeroize" version = "1.8.2" diff --git a/benchmarks/rust-baseline/Cargo.toml b/benchmarks/rust-baseline/Cargo.toml index 908e91f..b33e0af 100644 --- a/benchmarks/rust-baseline/Cargo.toml +++ b/benchmarks/rust-baseline/Cargo.toml @@ -30,6 +30,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" clap = { version = "4", features = ["derive"] } anyhow = "1" +rusqlite = "0.31" [profile.release] opt-level = 3 diff --git a/benchmarks/rust-baseline/README.md b/benchmarks/rust-baseline/README.md index 925348c..cc020b8 100644 --- a/benchmarks/rust-baseline/README.md +++ b/benchmarks/rust-baseline/README.md @@ -1,7 +1,21 @@ -# DecentDB raw-engine baseline benchmark +# DecentDB rust-baseline benchmark -This is a **raw Rust baseline** for the same benchmark suite the .NET tests -in `..` exercise. It links the `decentdb` crate directly (path-dep against +This benchmark is the apples-to-apples Rust runner for the music-library +workload used to compare DecentDB against SQLite. By default it runs DecentDB +directly through the Rust crate. With `--engine sqlite`, it runs the same schema, +seed plan, and query shapes through `rusqlite`. + +The SQLite path exists only in this benchmark crate. It does not add SQLite +tests, dependencies, or comparison behavior to the DecentDB engine core. + +For the current cross-benchmark performance plan, see +`../../design/METRIC_IMPROVEMENTS_PLAN.md`. The public README charts are driven +by `cargo bench -p decentdb --bench embedded_compare` and +`data/bench_summary.json`; this rust-baseline runner is the larger diagnostic +surface for music-library totals, point lookups, joins, views, and grouped +aggregates. + +The default DecentDB path links the `decentdb` crate directly (path-dep against `../../crates/decentdb`) and uses the engine's hot-path API: - `Db::create()` to make a fresh database @@ -14,14 +28,22 @@ There is **no FFI, no marshalling, no LINQ, no parameter rewriter**, and no ADO.NET command/connection layer — so the timings here represent the theoretical engine ceiling that any binding could approach but never beat. +The SQLite path uses `rusqlite` against the same generated workload, with +`journal_mode=WAL`, `synchronous=FULL`, and `wal_autocheckpoint=0`. Each seed +phase runs in one explicit `BEGIN IMMEDIATE` transaction. After seeding, both +engines run a measured WAL checkpoint before query timing starts: DecentDB uses +`Db::checkpoint_wal()` and SQLite uses `PRAGMA wal_checkpoint(TRUNCATE)`. Query +timing materializes every returned column before counting a row. + ## Schema and queries - `artists`, `albums`, `songs` tables with the same columns/PKs. - 5 secondary indexes (`idx_albums_artist`, `idx_songs_album`, etc.). - `v_artist_songs` view joining all three. -- 12 instrumented steps: `connect_open`, `schema_create`, three seed loops, - and seven query shapes including `COUNT(*)`, aggregates, by-id lookup, - Top-10 artists/albums by song count, and view scans. +- 13 instrumented steps: `connect_open`, `schema_create`, three seed loops, + `checkpoint_after_seed`, and seven query shapes including `COUNT(*)`, + aggregates, by-id lookup, Top-10 artists/albums by song count, and view + scans. ## Scales @@ -44,20 +66,46 @@ counts are reported as `Plan: artists=… total_albums=… total_songs=…`. ## Build & run ```bash -cd /home/steven/source/decentdb/benchmarks/rust-baseline +cd /home/steven/src/github/decentdb/benchmarks/rust-baseline cargo build --release -./target/release/rust-baseline --scale smoke -./target/release/rust-baseline --scale medium -./target/release/rust-baseline --scale full -./target/release/rust-baseline --scale huge -./target/release/rust-baseline --scale full --profile resident-hot-read +./target/release/rust-baseline --engine decentdb --benchmark +./target/release/rust-baseline --engine sqlite --benchmark +./target/release/rust-baseline --engine decentdb --scale smoke +./target/release/rust-baseline --engine decentdb --scale medium +./target/release/rust-baseline --engine decentdb --scale full +./target/release/rust-baseline --engine decentdb --scale huge +./target/release/rust-baseline --engine sqlite --scale smoke +./target/release/rust-baseline --engine decentdb --scale full --profile resident-hot-read ./target/release/rust-baseline --report ./target/release/rust-baseline --report --report-file /tmp/rust-baseline-report.html ``` +Use `--benchmark` to run all scales in order (`smoke`, `medium`, `full`, +`huge`) for the selected engine/profile and then generate the same HTML report +as `--report`. Suite mode uses the default per-engine/per-scale database paths +and rejects `--db-path`; use single-scale mode when you need to pin an exact +database file. + +To run the full DecentDB-vs-SQLite comparison into a temporary output +directory, use: + +```bash +cd /home/steven/src/github/decentdb/benchmarks/rust-baseline +cargo build --release +OUT="$PWD/../../.tmp/rust-baseline-compare/results" +mkdir -p "$OUT" +./target/release/rust-baseline --engine decentdb --benchmark --out-dir "$OUT" +./target/release/rust-baseline \ + --engine sqlite \ + --benchmark \ + --out-dir "$OUT" \ + --report-file "$OUT/report.html" +``` + ## Profiles -The default profile uses `DbConfig::default()`: durable WAL, deferred table +`--profile` applies only to `--engine decentdb`. The default profile uses +`DbConfig::default()`: durable WAL, deferred table materialization, and paged row storage with post-commit re-deferral. It is the low-memory profile and should remain the default historical comparison. @@ -68,28 +116,41 @@ sources resident after commit instead of dropping them back to the deferred set. This is a fair profile only when reported separately from default because it trades higher process memory for lower repeated read cost. +SQLite runs always use benchmark profile `sqlite-wal-full` and reject +DecentDB-only profiles. + ## Results JSON reports are written to `results/-rust-baseline--.json` where `` is -`YYYY-MM-DD-HHMM` (e.g., `2026-04-26-1430`). Older checked-in reports omit the -profile segment and are treated as the default profile. This timestamped naming -enables historical comparisons across multiple runs: +`YYYY-MM-DD-HHMM` (e.g., `2026-04-26-1430`). DecentDB default runs use +`default`; tuned DecentDB runs use their selected profile name; SQLite runs use +`sqlite-wal-full`. Older checked-in reports omit the profile segment and are +treated as the default profile. This timestamped naming enables historical +comparisons across multiple runs: ``` results/ ├── 2026-03-24-1200-rust-baseline-full.json -├── 2026-04-01-0900-rust-baseline-full.json -├── 2026-04-26-1430-rust-baseline-full.json +├── 2026-04-26-1430-rust-baseline-default-full.json +├── 2026-06-11-1215-rust-baseline-sqlite-wal-full-full.json └── ... ``` +Each JSON report records `binding`, `benchmark_profile`, `engine_version`, +database/WAL size after the run, peak RSS, total runtime, and every +instrumented step. The `checkpoint_after_seed` step records checkpoint duration +plus WAL/database bytes before and after the checkpoint in its `extra` object. +Use `binding` to separate DecentDB (`RustRaw`) from SQLite (`SQLiteRusqlite`) +when comparing runs programmatically. + ### Historical HTML report -`--report` is a **report-only** mode: it does not run a benchmark. Instead it -loads every `*.json` result in `results/`, groups runs by scale (`smoke`, -`medium`, `full`, `huge`), and writes a static HTML report to -`results/report.html` by default. +`--report` is a **report-only** mode when used by itself: it does not run a +benchmark. Instead it loads every `*.json` result in `results/`, groups runs by +scale (`smoke`, `medium`, `full`, `huge`), and writes a static HTML report to +`results/report.html` by default. `--benchmark` runs the suite first and then +performs this report generation step automatically. The generated report includes: @@ -100,19 +161,8 @@ The generated report includes: - raw run-history tables and per-step summary tables so regressions and improvements are easy to spot over time -Use `--report-file ` with `--report` to override the output path. - -## Headline numbers (engine 2.3.1, scale=`full`, ≈2.75M songs) - -| metric | RustRaw | -|------------------------------|----------:| -| `seed_artists` r/s | 792,664 | -| `seed_albums` r/s | 786,594 | -| `seed_songs` r/s | 672,241 | -| `seed_songs` slowdown vs raw | 1.00× | -| `query_top10_albums` (s) | 3.235 | -| peak RSS | 2.2 GB | -| DB size | 144.9 MB | +Use `--report-file ` with `--report` or `--benchmark` to override the +output path. ## Engine memory observation (worth filing) diff --git a/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-full.json b/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-full.json new file mode 100644 index 0000000..45da608 --- /dev/null +++ b/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-full.json @@ -0,0 +1,155 @@ +{ + "binding": "RustRaw", + "scale_name": "full", + "benchmark_profile": "default", + "target_artists": 50000, + "target_albums": 500000, + "target_songs_cap": 5000000, + "started_unix": 1781271637, + "finished_unix": 1781271652, + "engine_version": "2.10.0", + "database_path": "run-rust-full.ddb", + "database_size_bytes": 161189888, + "wal_size_bytes": 32, + "peak_rss_bytes": 708538368, + "steps": [ + { + "name": "connect_open", + "duration_seconds": 0.006048563, + "records": null, + "records_per_second": null, + "rss_bytes": 39452672, + "rss_anon_kb": 28612, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "schema_create", + "duration_seconds": 0.007789002, + "records": null, + "records_per_second": null, + "rss_bytes": 11993088, + "rss_anon_kb": 1796, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_artists", + "duration_seconds": 0.055255581, + "records": 50000, + "records_per_second": 904885.9697991413, + "rss_bytes": 30941184, + "rss_anon_kb": 20300, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_albums", + "duration_seconds": 0.471023433, + "records": 500000, + "records_per_second": 1061518.3130390034, + "rss_bytes": 203309056, + "rss_anon_kb": 188628, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_songs", + "duration_seconds": 2.122317449, + "records": 2749816, + "records_per_second": 1295666.6785619967, + "rss_bytes": 708538368, + "rss_anon_kb": 682016, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "checkpoint_after_seed", + "duration_seconds": 0.342206754, + "records": null, + "records_per_second": null, + "rss_bytes": 538898432, + "rss_anon_kb": 516352, + "rss_file_kb": 9916, + "extra": { + "checkpoint_mode": "wal", + "database_bytes_after": 161189888, + "database_bytes_before": 8192, + "wal_bytes_after": 32, + "wal_bytes_before": 167772160 + } + }, + { + "name": "query_count_songs", + "duration_seconds": 0.090038021, + "records": null, + "records_per_second": null, + "rss_bytes": 355319808, + "rss_anon_kb": 337076, + "rss_file_kb": 9916, + "extra": { + "count": 2749816 + } + }, + { + "name": "query_aggregate_durations", + "duration_seconds": 0.129008099, + "records": null, + "records_per_second": null, + "rss_bytes": 355364864, + "rss_anon_kb": 337120, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_artist_by_id", + "duration_seconds": 0.000075441, + "records": null, + "records_per_second": null, + "rss_bytes": 355364864, + "rss_anon_kb": 337120, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_top10_artists_by_songs", + "duration_seconds": 3.407594322, + "records": null, + "records_per_second": null, + "rss_bytes": 150626304, + "rss_anon_kb": 137180, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_top10_albums_by_songs", + "duration_seconds": 4.906226985, + "records": null, + "records_per_second": null, + "rss_bytes": 150614016, + "rss_anon_kb": 137168, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_view_first_1000", + "duration_seconds": 2.097430938, + "records": null, + "records_per_second": null, + "rss_bytes": 408055808, + "rss_anon_kb": 388576, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_songs_for_artist_via_view", + "duration_seconds": 0.868569525, + "records": null, + "records_per_second": null, + "rss_bytes": 407834624, + "rss_anon_kb": 388360, + "rss_file_kb": 9916, + "extra": {} + } + ] +} \ No newline at end of file diff --git a/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-medium.json b/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-medium.json new file mode 100644 index 0000000..97727d5 --- /dev/null +++ b/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-medium.json @@ -0,0 +1,155 @@ +{ + "binding": "RustRaw", + "scale_name": "medium", + "benchmark_profile": "default", + "target_artists": 5000, + "target_albums": 50000, + "target_songs_cap": 500000, + "started_unix": 1781271636, + "finished_unix": 1781271637, + "engine_version": "2.10.0", + "database_path": "run-rust-medium.ddb", + "database_size_bytes": 15314944, + "wal_size_bytes": 32, + "peak_rss_bytes": 92336128, + "steps": [ + { + "name": "connect_open", + "duration_seconds": 0.003039259, + "records": null, + "records_per_second": null, + "rss_bytes": 13885440, + "rss_anon_kb": 3644, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "schema_create", + "duration_seconds": 0.004280501, + "records": null, + "records_per_second": null, + "rss_bytes": 11636736, + "rss_anon_kb": 1448, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_artists", + "duration_seconds": 0.008510327, + "records": 5000, + "records_per_second": 587521.490067303, + "rss_bytes": 13381632, + "rss_anon_kb": 3152, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_albums", + "duration_seconds": 0.048201539, + "records": 50000, + "records_per_second": 1037311.2775507022, + "rss_bytes": 33234944, + "rss_anon_kb": 22540, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_songs", + "duration_seconds": 0.184605231, + "records": 276243, + "records_per_second": 1496398.5500497546, + "rss_bytes": 92336128, + "rss_anon_kb": 80256, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "checkpoint_after_seed", + "duration_seconds": 0.039218324, + "records": null, + "records_per_second": null, + "rss_bytes": 72036352, + "rss_anon_kb": 60432, + "rss_file_kb": 9916, + "extra": { + "checkpoint_mode": "wal", + "database_bytes_after": 15314944, + "database_bytes_before": 8192, + "wal_bytes_after": 32, + "wal_bytes_before": 16777216 + } + }, + { + "name": "query_count_songs", + "duration_seconds": 0.008567685, + "records": null, + "records_per_second": null, + "rss_bytes": 56029184, + "rss_anon_kb": 44800, + "rss_file_kb": 9916, + "extra": { + "count": 276243 + } + }, + { + "name": "query_aggregate_durations", + "duration_seconds": 0.013218261, + "records": null, + "records_per_second": null, + "rss_bytes": 56029184, + "rss_anon_kb": 44800, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_artist_by_id", + "duration_seconds": 0.000068528, + "records": null, + "records_per_second": null, + "rss_bytes": 56029184, + "rss_anon_kb": 44800, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_top10_artists_by_songs", + "duration_seconds": 0.348935494, + "records": null, + "records_per_second": null, + "rss_bytes": 25616384, + "rss_anon_kb": 15100, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_top10_albums_by_songs", + "duration_seconds": 0.504654391, + "records": null, + "records_per_second": null, + "rss_bytes": 25702400, + "rss_anon_kb": 15184, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_view_first_1000", + "duration_seconds": 0.217226281, + "records": null, + "records_per_second": null, + "rss_bytes": 55074816, + "rss_anon_kb": 43868, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_songs_for_artist_via_view", + "duration_seconds": 0.092963807, + "records": null, + "records_per_second": null, + "rss_bytes": 54841344, + "rss_anon_kb": 43640, + "rss_file_kb": 9916, + "extra": {} + } + ] +} \ No newline at end of file diff --git a/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-smoke.json b/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-smoke.json new file mode 100644 index 0000000..a296781 --- /dev/null +++ b/benchmarks/rust-baseline/results/2026-06-12-1340-rust-baseline-default-smoke.json @@ -0,0 +1,155 @@ +{ + "binding": "RustRaw", + "scale_name": "smoke", + "benchmark_profile": "default", + "target_artists": 500, + "target_albums": 5000, + "target_songs_cap": 50000, + "started_unix": 1781271636, + "finished_unix": 1781271636, + "engine_version": "2.10.0", + "database_path": "run-rust-smoke.ddb", + "database_size_bytes": 1478656, + "wal_size_bytes": 32, + "peak_rss_bytes": 19906560, + "steps": [ + { + "name": "connect_open", + "duration_seconds": 0.005303462, + "records": null, + "records_per_second": null, + "rss_bytes": 6012928, + "rss_anon_kb": 628, + "rss_file_kb": 5244, + "extra": {} + }, + { + "name": "schema_create", + "duration_seconds": 0.003744304, + "records": null, + "records_per_second": null, + "rss_bytes": 10121216, + "rss_anon_kb": 864, + "rss_file_kb": 9020, + "extra": {} + }, + { + "name": "seed_artists", + "duration_seconds": 0.002763662, + "records": 500, + "records_per_second": 180919.3743663299, + "rss_bytes": 10498048, + "rss_anon_kb": 1168, + "rss_file_kb": 9084, + "extra": {} + }, + { + "name": "seed_albums", + "duration_seconds": 0.007998375, + "records": 5000, + "records_per_second": 625126.9789175927, + "rss_bytes": 12644352, + "rss_anon_kb": 3136, + "rss_file_kb": 9212, + "extra": {} + }, + { + "name": "seed_songs", + "duration_seconds": 0.021034434, + "records": 27783, + "records_per_second": 1320834.2092779868, + "rss_bytes": 19906560, + "rss_anon_kb": 10228, + "rss_file_kb": 9212, + "extra": {} + }, + { + "name": "checkpoint_after_seed", + "duration_seconds": 0.008046286, + "records": null, + "records_per_second": null, + "rss_bytes": 16977920, + "rss_anon_kb": 7368, + "rss_file_kb": 9212, + "extra": { + "checkpoint_mode": "wal", + "database_bytes_after": 1478656, + "database_bytes_before": 8192, + "wal_bytes_after": 32, + "wal_bytes_before": 16777216 + } + }, + { + "name": "query_count_songs", + "duration_seconds": 0.000975332, + "records": null, + "records_per_second": null, + "rss_bytes": 15409152, + "rss_anon_kb": 5708, + "rss_file_kb": 9340, + "extra": { + "count": 27783 + } + }, + { + "name": "query_aggregate_durations", + "duration_seconds": 0.001442269, + "records": null, + "records_per_second": null, + "rss_bytes": 15794176, + "rss_anon_kb": 5764, + "rss_file_kb": 9660, + "extra": {} + }, + { + "name": "query_artist_by_id", + "duration_seconds": 0.000037541, + "records": null, + "records_per_second": null, + "rss_bytes": 15794176, + "rss_anon_kb": 5764, + "rss_file_kb": 9660, + "extra": {} + }, + { + "name": "query_top10_artists_by_songs", + "duration_seconds": 0.034113804, + "records": null, + "records_per_second": null, + "rss_bytes": 12931072, + "rss_anon_kb": 2968, + "rss_file_kb": 9660, + "extra": {} + }, + { + "name": "query_top10_albums_by_songs", + "duration_seconds": 0.049339026, + "records": null, + "records_per_second": null, + "rss_bytes": 12886016, + "rss_anon_kb": 2924, + "rss_file_kb": 9660, + "extra": {} + }, + { + "name": "query_view_first_1000", + "duration_seconds": 0.021542078, + "records": null, + "records_per_second": null, + "rss_bytes": 15343616, + "rss_anon_kb": 5260, + "rss_file_kb": 9724, + "extra": {} + }, + { + "name": "query_songs_for_artist_via_view", + "duration_seconds": 0.008561393, + "records": null, + "records_per_second": null, + "rss_bytes": 15339520, + "rss_anon_kb": 5064, + "rss_file_kb": 9916, + "extra": {} + } + ] +} \ No newline at end of file diff --git a/benchmarks/rust-baseline/results/2026-06-12-1342-rust-baseline-default-huge.json b/benchmarks/rust-baseline/results/2026-06-12-1342-rust-baseline-default-huge.json new file mode 100644 index 0000000..4a73beb --- /dev/null +++ b/benchmarks/rust-baseline/results/2026-06-12-1342-rust-baseline-default-huge.json @@ -0,0 +1,155 @@ +{ + "binding": "RustRaw", + "scale_name": "huge", + "benchmark_profile": "default", + "target_artists": 250000, + "target_albums": 2500000, + "target_songs_cap": 25000000, + "started_unix": 1781271652, + "finished_unix": 1781271732, + "engine_version": "2.10.0", + "database_path": "run-rust-huge.ddb", + "database_size_bytes": 833892352, + "wal_size_bytes": 32, + "peak_rss_bytes": 3446149120, + "steps": [ + { + "name": "connect_open", + "duration_seconds": 0.005878543, + "records": null, + "records_per_second": null, + "rss_bytes": 250970112, + "rss_anon_kb": 235172, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "schema_create", + "duration_seconds": 0.031754994, + "records": null, + "records_per_second": null, + "rss_bytes": 12103680, + "rss_anon_kb": 1904, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_artists", + "duration_seconds": 0.256828467, + "records": 250000, + "records_per_second": 973412.3437336874, + "rss_bytes": 101318656, + "rss_anon_kb": 89028, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_albums", + "duration_seconds": 2.517898258, + "records": 2500000, + "records_per_second": 992891.5880762328, + "rss_bytes": 924823552, + "rss_anon_kb": 893232, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "seed_songs", + "duration_seconds": 18.041484802, + "records": 13746520, + "records_per_second": 761939.5050276639, + "rss_bytes": 3446149120, + "rss_anon_kb": 3355464, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "checkpoint_after_seed", + "duration_seconds": 1.9839196810000002, + "records": null, + "records_per_second": null, + "rss_bytes": 2589343744, + "rss_anon_kb": 2518740, + "rss_file_kb": 9916, + "extra": { + "checkpoint_mode": "wal", + "database_bytes_after": 833892352, + "database_bytes_before": 8192, + "wal_bytes_after": 32, + "wal_bytes_before": 805306368 + } + }, + { + "name": "query_count_songs", + "duration_seconds": 0.416849104, + "records": null, + "records_per_second": null, + "rss_bytes": 1683533824, + "rss_anon_kb": 1634160, + "rss_file_kb": 9916, + "extra": { + "count": 13746520 + } + }, + { + "name": "query_aggregate_durations", + "duration_seconds": 0.666562944, + "records": null, + "records_per_second": null, + "rss_bytes": 1683550208, + "rss_anon_kb": 1634176, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_artist_by_id", + "duration_seconds": 0.000087795, + "records": null, + "records_per_second": null, + "rss_bytes": 1683550208, + "rss_anon_kb": 1634176, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_top10_artists_by_songs", + "duration_seconds": 16.653227525, + "records": null, + "records_per_second": null, + "rss_bytes": 723496960, + "rss_anon_kb": 696624, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_top10_albums_by_songs", + "duration_seconds": 24.443281897, + "records": null, + "records_per_second": null, + "rss_bytes": 723472384, + "rss_anon_kb": 696600, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_view_first_1000", + "duration_seconds": 10.722553411, + "records": null, + "records_per_second": null, + "rss_bytes": 2124804096, + "rss_anon_kb": 2065088, + "rss_file_kb": 9916, + "extra": {} + }, + { + "name": "query_songs_for_artist_via_view", + "duration_seconds": 4.521317772, + "records": null, + "records_per_second": null, + "rss_bytes": 2124570624, + "rss_anon_kb": 2064860, + "rss_file_kb": 9916, + "extra": {} + } + ] +} \ No newline at end of file diff --git a/benchmarks/rust-baseline/results/report.html b/benchmarks/rust-baseline/results/report.html index 0a8587f..a7bd0fe 100644 --- a/benchmarks/rust-baseline/results/report.html +++ b/benchmarks/rust-baseline/results/report.html @@ -142,14 +142,14 @@

DecentDB rust-baseline analytics report

-

Generated 2026-05-28 03:07:38 UTC from results using 43 historical run(s).

+

Generated 2026-06-12 13:42:13 UTC from results using 47 historical run(s).

- +