Commit graph

1 commit

Author SHA1 Message Date
jedarden
77b1cd72c3 feat(bf-5cdj): sample per-worker process RSS from /proc and expose via API
Some checks are pending
CI / test (18.x) (push) Waiting to run
CI / test (20.x) (push) Waiting to run
CI / test (22.x) (push) Waiting to run
Add MemorySampler that polls active worker PIDs every 10s to sample
/proc/<pid>/status for VmRSS, VmPeak, and VmSwap memory metrics.

Changes:
- Add MemorySampler class with periodic sampling (10s interval)
- Attach rssKb, peakRssKb, swapKb to WorkerState in types.ts
- Integrate with InMemoryEventStore to register PIDs from events
- Expose memory fields on GET /api/workers response
- Broadcast updated memory fields via WebSocket
- Add comprehensive test suite

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 09:58:04 -04:00