Skip to content

feat(ci): add a manual public benchmark workflow - #197

Merged
kevincostner17 merged 2 commits into
mainfrom
ci/public-benchmark
Sep 14, 2026
Merged

kevincostner17 merged 2 commits into
mainfrom
ci/public-benchmark

Conversation

@kevincostner17

Copy link
Copy Markdown
Contributor

Closes #4.

Summary

#4 asked for a manually triggered workflow whose artifact holds the benchmark table and the freshdata version, and that never blocks CI. The script it named (benchmarks/public_benchmark.py) didn't exist, and the "Strategic-report scaling benchmarks" table in docs/benchmarks.md still reads not yet measured.

benchmarks/public_benchmark.py

A thin orchestrator with no new measurement code. It runs the existing harnesses in subprocesses:

  • benchmarks/bench_report.py all covers the scaling cases (CSV ingest + clean, mixed-schema profile, null-fill, import time, peak memory), balanced vs aggressive.
  • benchmarks/bench.py run --repeat N + report produces the per-fixture speed/quality table.

It writes public-benchmark.md and public-benchmark.json, stamped with the freshdata version, commit, CPU count and RAM, Python and platform, and pandas/numpy/pyarrow/polars/duckdb versions.

Flags:

  • --scale ci (default: 50 MB CSV, 1M rows), sized for a 2-core / 7 GB hosted runner
  • --scale full (harness defaults, incl. 10M-row null-fill)
  • --csv-mb, --rows, --repeat, --size, --skip-scaling, --skip-fixtures, --output-dir

.github/workflows/public-benchmark.yml

  • workflow_dispatch only, with scale (ci/full) and repeat inputs. It never runs on push or pull requests, so it can't block CI.
  • Installs with -c constraints/ci.txt. Actions are SHA-pinned, contents: read, 120-minute timeout.
  • Appends the report to the run summary and uploads public-benchmark-<run id> (md, json, report_bench.json).

docs/benchmarks.md gains a short "Refreshing the public numbers" section.

Verification

  • New tests/benchmark/test_public_benchmark.py (8 tests):
    • markdown contains the version, environment and both tables
    • cases that didn't run are omitted
    • orchestration with a fake harness runner (exact commands for ci/full, --skip-scaling, both-skipped error)
    • real environment collection
    • workflow contract: workflow_dispatch only, uploads an artifact
  • 8 passed on Python 3.12 and on 3.9; ruff check clean; the workflow parses as YAML.
  • Real local run: python benchmarks/public_benchmark.py --csv-mb 1 --rows 20000 --repeat 1 --size 2000 completed in about 18s. It rendered all five scaling rows and six fixture rows under the freshdata 2.0.0 / commit / hardware header, and wrote nothing outside the git-ignored benchmarks/results/.

Once this merges, run gh workflow run public-benchmark.yml for the first hosted numbers.

benchmarks/public_benchmark.py runs the two existing harnesses in
subprocesses - bench_report.py (CSV ingest, profile, null-fill, import
time, peak memory; balanced vs aggressive) and bench.py run/report (the
per-fixture table) - and writes one shareable public-benchmark.md/.json
stamped with the freshdata version, commit, CPU/RAM and package versions.
`--scale ci` (default) keeps the scaling cases inside a hosted runner;
`--scale full` uses the harness defaults.

.github/workflows/public-benchmark.yml is workflow_dispatch only (scale and
repeat inputs), installs from constraints/ci.txt, appends the report to the
job summary and uploads it as public-benchmark-<run id>. It never runs on
push or pull requests. docs/benchmarks.md explains how to refresh.
@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 012bc2a7-2217-4624-9989-53b4fe276ab8


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

FreshData benchmark report — performance

  • freshdata: ?
  • python: ?
  • platform: ?
fixture n_rows n_cols p50 s p95 s peak MB repair % false-repair % preserve % trust monotonic export %

Authored-code reduction (Metric 6)

@kevincostner17
kevincostner17 merged commit f535316 into main Sep 14, 2026
19 checks passed
@kevincostner17
kevincostner17 deleted the ci/public-benchmark branch September 14, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a public benchmark refresh workflow

1 participant