Repository navigation
feat(report): measure how long each job waits for a runner - #16
Merged
Merged
Conversation
The report only had the wait for a run's first job, which hides the queue that builds up later in a run: a job that needs another one is created when its dependency ends, and on 15/10/2026 a seal job waited 13 minutes for a runner after everything else had finished. Read the jobs from the REST API (created_at to started_at) for the sampled runs and add a section with the median, p90 and maximum wait, the job that waits longest, and the runners online.
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.
Summary
ci_report.pymeasured only the wait of a run's first job. A job that needs another one is createdwhen its dependency ends, so the queue that builds up later in a run was invisible.
Github.job_timingsreads the jobs of a run from the REST API, which carriescreated_at(when thejob became ready) next to
started_at;gh run viewdoes not.job that waits longest and the runners online, so a high figure can be read against capacity.
Verification
tests/test_ci_report.py: 9 new tests (waits, percentile, section, real command, unreadable run);146 tests pass together;
ruff format --checkclean.12 s, p90 10 min, 28 % of the jobs waited more than five minutes, mostly at the busy hours.
Notes