Skip to content

feat(stats): job minutes, --json and --csv - #45

Open
Variiuz wants to merge 1 commit into
mainfrom
feat/stats-minutes-json
Open

Variiuz wants to merge 1 commit into
mainfrom
feat/stats-minutes-json

Conversation

@Variiuz

@Variiuz Variiuz commented Nov 11, 2026

Copy link
Copy Markdown
Owner

mayfly stats gets a JOB MIN column (minutes of the guests that ran a job, clone to destroy) and two formats for scripts:

$ mayfly stats --csv
slot,labels,kind,guests,jobs,idle,stuck,cut,errors,job_minutes,guest_minutes,median_minutes
a-1,"linux,big",vm,2,2,0,0,0,0,42,42,12
p-1,small,pod,1,,0,0,0,0,,31,
all,,,3,2,0,0,0,0,42,73,12

--json prints the same as {"hours", "slots": [...], "all": {...}}. Labels and kind come from slots.conf (empty for a slot that is gone from it). guest_minutes counts every guest, idle ones and pod VMs too, so it is the host time; job_minutes is what hosted runners would have billed, with boot included. Pods have no job count or job minutes (null / empty), as before.

Tested: cargo fmt, clippy, cargo test; ran the release binary against a stub journal in all three formats.

Notes: mayfly stats shows job minutes and prints --json or --csv.


Generated by Claude Code

`mayfly stats` adds a JOB MIN column: the minutes of the guests that ran a
job, clone to destroy. `--json` and `--csv` print each slot with its labels
and kind, guest minutes of every guest (pods too), and an `all` row, for
scripts that compare the host with hosted runners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GGBbe8FgqqUCF5fNkd9Ndi
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.

2 participants