Repository navigation
ci: add a manual dbt comparison benchmark workflow - #1187
Merged
Merged
Conversation
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.
Why
The benchmarks page needs a reproducible SQLBuild vs dbt comparison. Our shared dev machine is too loaded for fair wall times, so the benchmark runs on a GitHub-hosted runner from released PyPI packages.
Changes
benchmarks/dbt-compare/:write_dbt_dense.pywrites the CI dense project for SQLBuild (DuckDB), a rules-off copy and an equivalent dbt project (same SQL, names, folders, DAG; Jinja macros,unit_tests,data_tests, UDF functions).edit_models.pyedits N model bodies.bench.shtimes cold, warm, one-model edit and 100-model edit runs per variant over interleaved rounds.summarize.pyprints median wall, CPU and peak RSS per cell.correctness.shruns every tool on clean, missing-ref and missing-column projects. README covers method and what isn't equivalent.sqb_rules,sqb_norules,sqb_rules_full(reuse and delta off), dbt v2parse,compile,compile --static-analysis strict, dbt Coreparse/compileas reference..github/workflows/benchmark-dbt.yml:workflow_dispatchonly, onubuntu-24.04like the dense compile jobs, 300-minute timeout. Inputs pin sqlbuild (default latest), dbt 2.0.9, dbt-core 1.12.6, dbt-duckdb 1.11.0, models, rounds, variants. It uploads results plussummary.md(runner CPU/RAM, versions, correctness and benchmark tables) and writes the summary to the job page.No product code changes, no raw results.
Verification
actionlinton all workflows; release gate check passes.ruff format --checkandruff checkonbenchmarks/.bench.sh(all eight variants, 100 models, one round) andcorrectness.shagainst the released packages: all runs exit 0 on the clean project. SQLBuild reports reuse and delta compiles where expected. Both seeded errors fail in SQLBuild; only the missing ref fails in dbt default compile.