Commit graph

3 commits

Author SHA1 Message Date
d624d46822
test(stress): increase cpu-stress to 3 workers with 2.0 CPU limit
All checks were successful
ci / build (push) Successful in 26s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:32:55 +01:00
5b983692c8
test: add stress test with receiver integration
All checks were successful
ci / build (push) Successful in 38s
Docker Compose setup that:
- Runs metrics receiver with SQLite storage
- Spawns CPU and memory stress workloads using stress-ng
- Uses shared PID namespace (pid: service:cpu-stress) for proper isolation
- Collector gathers metrics and pushes summary on shutdown

Known issue: Container CPU summary may show overflow values on first
sample due to delta calculation - to be fixed in accumulator.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:11:22 +01:00
5e470c33a5
feat(collector): group CPU and memory metrics by cgroup
All checks were successful
ci / build (push) Successful in 30s
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