ci: add a CI usage report script #362

Merged
ullrich merged 1 commit from ci/usage-report into main 2026-11-18 09:05:14 +00:00
Owner

node scripts/ci-usage.mjs [days] prints runner minutes per job, median and p90 job time, and the wall time of green CI runs. It needs no token: it reads the public Forgejo API. Job times come from commit statuses, because the Actions API has no per-job timing.

Rebased on main after #360, #361 and #363 merged. The only conflict was one row in scripts/README.md.

Baseline

The 30 days before 2026-11-18, before those three PRs:

Item Value
Runner minutes in total 2,487
CI on pull requests 1,210 min (49%)
Renovate scheduled runs 638 min (26%), 261 runs, median 163 s
CI on main pushes 267 min (11%)
CD workflows 221 min (9%)
Dependency audit 136 min (5%)
Green PR run, wall time median 672 s, p90 1,891 s
Green PR run, runner time median 586 s

How to use it

Run node scripts/ci-usage.mjs 30 on or after 2026-12-18 and compare with the table. The replays predict a saving of about 100 minutes in 30 days: about 63 from the path rule (#361) and about 43 from the identical-tree rule (#363). Most of the runner time is Renovate, which these PRs do not change.

🤖 Generated with Claude Code

`node scripts/ci-usage.mjs [days]` prints runner minutes per job, median and p90 job time, and the wall time of green CI runs. It needs no token: it reads the public Forgejo API. Job times come from commit statuses, because the Actions API has no per-job timing. Rebased on main after #360, #361 and #363 merged. The only conflict was one row in `scripts/README.md`. ## Baseline The 30 days before 2026-11-18, before those three PRs: | Item | Value | |---|---| | Runner minutes in total | 2,487 | | CI on pull requests | 1,210 min (49%) | | Renovate scheduled runs | 638 min (26%), 261 runs, median 163 s | | CI on main pushes | 267 min (11%) | | CD workflows | 221 min (9%) | | Dependency audit | 136 min (5%) | | Green PR run, wall time | median 672 s, p90 1,891 s | | Green PR run, runner time | median 586 s | ## How to use it Run `node scripts/ci-usage.mjs 30` on or after 2026-12-18 and compare with the table. The replays predict a saving of about 100 minutes in 30 days: about 63 from the path rule (#361) and about 43 from the identical-tree rule (#363). Most of the runner time is Renovate, which these PRs do not change. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: add a CI usage report script
All checks were successful
CI / Dockerfile Package Check (pull_request) Successful in 4s
CI / Security Scan (pull_request) Successful in 16s
CI / Visual Tests (pull_request) Successful in 42s
CI / Journal Image Smoke Test (pull_request) Successful in 53s
CI / Checks (pull_request) Successful in 1m3s
CI / E2E Tests (pull_request) Successful in 3m32s
97b0e825d0
node scripts/ci-usage.mjs [days] prints runner minutes per job, median
and p90 job time, and the wall time of green CI runs. It reads the
public Forgejo API. Job times come from commit statuses, because the
Actions API has no per-job timing.

Use it to measure the effect of a CI change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ullrich force-pushed ci/usage-report from 97b0e825d0
All checks were successful
CI / Dockerfile Package Check (pull_request) Successful in 4s
CI / Security Scan (pull_request) Successful in 16s
CI / Visual Tests (pull_request) Successful in 42s
CI / Journal Image Smoke Test (pull_request) Successful in 53s
CI / Checks (pull_request) Successful in 1m3s
CI / E2E Tests (pull_request) Successful in 3m32s
to 62eb9f41c1
All checks were successful
CD Staging / Build & Push journal Image (pull_request) Has been skipped
CD Staging / Build & Push planner Image (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CD Staging / Tear Down PR Preview (pull_request) Has been skipped
CI / Dockerfile Package Check (pull_request) Successful in 5s
CI / Security Scan (pull_request) Successful in 8s
CI / Visual Tests (pull_request) Successful in 38s
CI / Checks (pull_request) Successful in 54s
CI / Journal Image Smoke Test (pull_request) Successful in 1m0s
CI / E2E Tests (pull_request) Successful in 3m13s
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 5s
2026-11-18 09:00:11 +00:00
Compare
ullrich scheduled this pull request to auto merge when all checks succeed 2026-11-18 09:02:08 +00:00
ullrich deleted branch ci/usage-report 2026-11-18 09:05:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!362
No description provided.