chore/benchmarks#11
Draft
themixednuts wants to merge 70 commits into
Draft
Conversation
Owner
themixednuts
commented
Apr 28, 2026
- feat(bench): add benchmark runner, spec contracts, and transaction lifetime refactor
- feat(ci): wire benchmark runner into CI with R2 publish pipeline
- fix(macros): gate driver codegen on calling crate's actual dependencies
- feat(bench): add cross-runtime benchmark targets and dashboard
- feat(ci): split criterion and runner benchmark workflows
- feat(bench): add native SpacetimeDB TypeScript target
- chore(bench): snapshot target dependency installs and builds
- chore(bench): capture runner outputs and dashboard logs
- test(bench): stabilize runner smoke fixtures and matrix
- chore(bench): ignore dashboard build artifacts
- fix(ci): use per-OS feature matrix for sqlite benchmarks
- feat(builder): typestate deduplication and compile-time GROUP BY validation
- fix(ci): drop libsql from macOS benchmarks
- fix(ci): drop libsql from Linux benchmarks too
- feat(sqlite): scaffold Cloudflare D1 driver (WASM-only)
- fix(transaction): decouple query lifetimes from tx borrows
- feat(bench): add benchmark runner, spec contracts, and transaction lifetime refactor
- feat(ci): wire benchmark runner into CI with R2 publish pipeline
- fix(macros): gate driver codegen on calling crate's actual dependencies
- feat(bench): add cross-runtime benchmark targets and dashboard
- feat(ci): split criterion and runner benchmark workflows
- fix(macros): correct rusqlite enum impl gating
- chore(bench): drop local dashboard run logs
- fix: stabilize benchmark dashboard navigation
- fix: pin dashboard ISR dependency to git
- chore: migrate dashboard tooling to vite plus
- refactor(dashboard): use effect for benchmark data
- refactor(dashboard): colocate svelte state classes
- refactor(dashboard): apply benchmark handoff design
- feat(bench): add orm runner coverage
- fix(bench): align external postgres runners
- fix(bench): harden postgres runner parity
- perf(bench): cache postgres seed setup
- chore: ignore codex dashboard logs
- fix(bench): repair postgres builder rebase
- chore(bench): untrack generated benchmark artifacts
- ci(bench): add dashboard preview artifacts
…fetime refactor
- Separate transaction lifetime ('tx) from query lifetime ('q) across
all transaction builders and macros for both SQLite and PostgreSQL
- Add bench-runner crate: run, capture, load, parity, validate, publish
commands for the throughput-http benchmark suite
- Add benchmark spec files (workload, targets, requests) for SQLite,
PostgreSQL, and Turso
- Harden postgres bench DATABASE_URL parsing for CI port mapping
- Add bench-runner to workspace members
- Remove unused puffin_egui/eframe dev-dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add contract runner steps to SQLite, PostgreSQL, and Turso CI jobs: - Run bench-runner with workload/target specs per suite - Validate artifacts against JSON schemas - Publish run artifacts and index to R2 on main branch pushes - Cache and restore runner baselines for regression comparison - Wrap bench commands in telemetry capture for CPU/resource tracking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When `--all-features` is used across a workspace, proc macro feature flags are enabled even for crates that don't depend on all drivers. This caused generated code (e.g. `::libsql::Row`) to fail in crates without that driver as a direct dependency. Add `caller_has_dep()` using `proc_macro_crate::crate_name()` to check at expansion time whether the calling crate actually has the driver in its Cargo.toml, combined with the existing `#[cfg(feature)]` gate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the benchmark branch green by updating runner smoke defaults and isolating the bench test recipe from workspace feature unification.
Ignore local dashboard and benchmark build outputs on the benchmarks branch so generated SvelteKit, Wrangler, node_modules, and target artifacts stay out of git status.
Windows skips turso/libsql features to avoid upstream segfaults. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dation Typestate deduplication: - Add capability marker traits (WhereAllowed, GroupByAllowed, etc.) to replace duplicated per-state impl blocks with trait-gated generics - Reduce select builder method duplication across 7 wrapper layers GROUP BY column tracking: - Add Grouped type parameter to QueryBuilder that tracks grouped columns as a type-level Cons list - Change group_by() to accept typed columns/tuples via IntoGroupBy trait - Add ScalarColumnsIn validation: when GROUP BY is present, every non-aggregate SELECT column must appear in the GROUP BY list - No GROUP BY = any mix of scalar/aggregate is valid (correct SQL) API changes: - group_by([col]) → group_by(col), group_by((col1, col2)) for tuples - Remove all_as/get_as/rows_as escape hatches from public API - All terminal methods (all/get) enforce aggregate validation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Turso's async runtime sets SQLite threading mode, causing libsql's threading assertion to panic when both run in the same process. Linux handles this; macOS does not. Remove libsql from macOS feature set to match Windows (rusqlite-only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Same turso+libsql threading conflict affects Linux, not just macOS. The turso async runtime sets SQLite threading mode which causes libsql's threading assertion to panic. Remove libsql from all benchmark feature sets — libsql benchmarks need a separate binary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds an async D1 driver under `src/builder/sqlite/d1/`, gated behind a new top-level `d1` cargo feature AND `target_arch = "wasm32"` so native builds are unaffected. Wraps `worker::D1Database` and plugs into the existing `Drizzle<Conn, Schema>` wrapper, so every generic SQLite builder method (select/insert/update/delete/with) works without change. Two deliberate differences vs. the other SQLite drivers: - **No transactions.** D1 has no BEGIN/COMMIT — Workers can't hold an open connection. `D1Database::batch` is the only atomic primitive, and upstream drizzle-orm's D1 driver also omits `.transaction()`. Schema creation and migrations route through `batch()` to stay atomic. - **Serde-based row decoding.** D1 returns each row as a JS object keyed by column name, so `all`/`get` require `T: serde::Deserialize` instead of `TryFrom<&Row>`. The `#[SQLiteFromRow]` macro already emits `Deserialize` when the `serde` feature is on, so downstream code just works. A follow-up will extend the macro to emit a D1-specific typed row path. The `d1` feature pulls `std`, `sqlite`, `serde`, `worker` (with its `d1` feature), `wasm-bindgen`, `js-sys`, and forwards `uuid/js` because drizzle-migrations pulls uuid and uuid's v4 RNG on wasm32 needs the browser `js` backend to link. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…fetime refactor
- Separate transaction lifetime ('tx) from query lifetime ('q) across
all transaction builders and macros for both SQLite and PostgreSQL
- Add bench-runner crate: run, capture, load, parity, validate, publish
commands for the throughput-http benchmark suite
- Add benchmark spec files (workload, targets, requests) for SQLite,
PostgreSQL, and Turso
- Harden postgres bench DATABASE_URL parsing for CI port mapping
- Add bench-runner to workspace members
- Remove unused puffin_egui/eframe dev-dependencies
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add contract runner steps to SQLite, PostgreSQL, and Turso CI jobs: - Run bench-runner with workload/target specs per suite - Validate artifacts against JSON schemas - Publish run artifacts and index to R2 on main branch pushes - Cache and restore runner baselines for regression comparison - Wrap bench commands in telemetry capture for CPU/resource tracking Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When `--all-features` is used across a workspace, proc macro feature flags are enabled even for crates that don't depend on all drivers. This caused generated code (e.g. `::libsql::Row`) to fail in crates without that driver as a direct dependency. Add `caller_has_dep()` using `proc_macro_crate::crate_name()` to check at expansion time whether the calling crate actually has the driver in its Cargo.toml, combined with the existing `#[cfg(feature)]` gate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.