Conversation
There was a problem hiding this comment.
Pull request overview
Adds automated collection and reporting for release build time + binary size trends to make regressions visible over time via GitHub Actions artifacts and an HTML dashboard.
Changes:
- Introduces a
build-release.ymlworkflow to run clean--release --timings, collect per-crate timings, binary sizes, andcargo bloat, and upload artifacts. - Introduces a
produce-build-stats.ymlworkflow to download recent artifacts and generate an HTML/Vue/Chart.js report. - Adds Python scripts to parse timing HTML + binaries into JSON and to aggregate artifacts into a
build-stats-data.jspayload consumed by the report.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/produce-build-stats.yml | Scheduled/manual workflow to fetch recent build-release artifacts and publish an HTML report artifact. |
| .github/workflows/build-release.yml | Push/manual workflow to perform a clean release build with timings, compute size/bloat metrics, and upload artifacts. |
| .github/scripts/parse-build-stats.py | Parses Cargo timing HTML and release binaries into JSON artifacts for later aggregation. |
| .github/scripts/generate-stats-data.py | Aggregates per-run JSON/text artifacts into a JS data file used by the HTML dashboard. |
| .github/scripts/build-stats-report.html | HTML dashboard (Vue 3 + Chart.js) that visualizes build-time and size trends and shows latest cargo-bloat output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1043 +/- ##
==========================================
- Coverage 89.47% 89.47% -0.01%
==========================================
Files 460 461 +1
Lines 85369 85494 +125
==========================================
+ Hits 76387 76498 +111
- Misses 8982 8996 +14
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
hildebrandmw
left a comment
There was a problem hiding this comment.
Thanks Alex! Any idea on how long all this takes to run in CI?
| tool: cargo-bloat,cargo-llvm-lines | ||
|
|
||
| - name: Build release with timings | ||
| run: cargo clean && cargo build --workspace --release --locked --timings |
There was a problem hiding this comment.
If you hit this with a cargo clean, there's no reason to cache anything Swatinem/rust-cache.
There was a problem hiding this comment.
Removed Swatinem/rust-cache
|
|
||
| - name: Collect artifacts from recent runs | ||
| run: | | ||
| set -euo pipefail |
There was a problem hiding this comment.
Thoughts on making this an independent script that could also be run locally? Something to help with local debugging/running?
There was a problem hiding this comment.
Done. extracted it into .github/scripts/build-stats-report.sh
| @@ -0,0 +1,196 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
Move to .github/reports or something?
Here is an example: https://github.com/microsoft/DiskANN/actions/runs/25533992329/job/74945898287
|
Why
We need to track release build time and binary size trends to catch regressions early and review weekly. Currently we have no visibility into how build times or output sizes change over time.
What
Two new workflows:
main(on post-checkin). Performs a clean release build with--timings, logs crate build times and binary sizes to the console, runscargo bloatandcargo llvm-lines, and uploads structured JSON artifacts (90-day retention).Example report
See: https://github.com/microsoft/DiskANN/actions/runs/25590491134
To view:
build-stats-reportartifact zipbuild-stats-report.htmlin a browser. Thebuild-stats-data.jsfile must be in the same directory.