mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-20 04:59:34 +01:00
The header's CPU figure was the 1-minute load average divided by the core count, capped at 100. Load counts runnable tasks, not busy time, so a host with bursty processes, or a VM whose vCPU threads count as runnable, read 100% while most cores were idle. It is now busy time across all cores since the previous reading, from os.cpus(), with a one-second minimum window on the monotonic clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
601 B
601 B
aicodeman
| aicodeman |
|---|
| patch |
The header CPU reading shows CPU use: busy time across all cores since the previous reading, from os.cpus(). It used to show the 1-minute load average divided by the core count, capped at 100, which counts runnable tasks rather than busy time. A host with bursty short-lived processes, or with a VM whose vCPU threads count as runnable, read 100% while most of its cores were idle. Readings under a second apart reuse the last value, so several open browsers share one window. The load-average figure remains only as a fallback for a platform that reports no core times.