forgejo-runner-optimiser/internal
Manuel Ganter 5e470c33a5
All checks were successful
ci / build (push) Successful in 30s
feat(collector): group CPU and memory metrics by cgroup
Add cgroup-based process grouping to the resource collector. Processes are
grouped by their cgroup path, with container names resolved via configurable
process-to-container mapping.

New features:
- Read cgroup info from /proc/[pid]/cgroup (supports v1 and v2)
- Parse K8s resource notation (500m, 1Gi, etc.) for CPU/memory limits
- Group metrics by container using CGROUP_PROCESS_MAP env var
- Calculate usage percentages against limits from CGROUP_LIMITS env var
- Output cgroup metrics with CPU cores used, memory RSS, and percentages

Environment variables:
- CGROUP_PROCESS_MAP: Map process names to container names for discovery
- CGROUP_LIMITS: Define CPU/memory limits per container in K8s notation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 14:50:36 +01:00
..
cgroup feat(collector): group CPU and memory metrics by cgroup 2026-02-06 14:50:36 +01:00
collector feat(collector): add HTTP push for metrics to receiver 2026-02-06 11:44:20 +01:00
integration test: add integration tests for collector-receiver interaction 2026-02-06 12:12:36 +01:00
metrics feat(collector): group CPU and memory metrics by cgroup 2026-02-06 14:50:36 +01:00
output feat(collector): group CPU and memory metrics by cgroup 2026-02-06 14:50:36 +01:00
proc feat(collector): group CPU and memory metrics by cgroup 2026-02-06 14:50:36 +01:00
receiver refactor(receiver): change query endpoint to filter by workflow and job 2026-02-06 12:00:22 +01:00
summary feat(collector): add HTTP push for metrics to receiver 2026-02-06 11:44:20 +01:00