Skip to content

CICD-465 · Runner utilization reporting ​

Encyclopedia · FinOps and resource optimization · All snippets

Previous · CICD-464 · Next · CICD-466

1. Where it fits ​

  • Placement CI usage report.
  • Prerequisites authorized read reports, explicit pricing period and reviewed ownership for cleanup.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
jq -e '[.[] | select(.capacity_seconds>0)] | (map(.busy_seconds)|add) / (map(.capacity_seconds)|add)' runner-windows.json

3. How it works ​

The expression filters or transforms the input JSON. Where jq -e is used, a false or empty result can fail the gate.

4. Verify the result ​

Use discrete runner time windows and avoid double-counting simultaneous jobs. Analyze queue delay alongside utilization.

Validation syntax-validated (Bash parse). Status definitions.