python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
docker compose up -d db
psql "postgresql://user:password@localhost:5432/test_db" -f sql/init.sqlruff check .
pytest --covBoth run in CI against a real PostgreSQL service, so integration tests will not be skipped there.
See Adding your own benchmark. The rules that matter:
- Use
measure()frombenchmarks.base— it does the warm-up and the median. Hand-rolledtime.perf_counter()around a single run reintroduces the cold-cache bias. - Derive your data points from
table_row_count(conn), never hardcode them. A benchmark whose parameters exceed the dataset silently measures an empty result set. - Prefix any object you create with
sqlperf_and drop it inteardown(). The tool must never destroy a table it did not create. - Raise
BenchmarkNotApplicablewhen the dataset is too small for your benchmark to mean anything, instead of returning a chart built on nothing.
Every benchmark is automatically covered by the integration suite, which asserts that it fetches a non-empty result set. If your benchmark cannot satisfy that, it is measuring the wrong thing.
Conventional Commits: feat:, fix:, chore:, docs:,
test:. Keep PRs small.