Files
tty7/crates
c361bd71e8 feat(panel): CPU% and memory per process, and a total, in Info → Processes (#1064)
* feat(panel): CPU% and memory per process, and a total, in Info → Processes

The daemon adds rss, cpu_ns and a start stamp to each ProcEntry (serde
default, so an old daemon or GUI skips them). The GUI turns two CPU-time
samples into a ps-style % and sums both into a Total line. `tty7 procs`
gains an RSS column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(panel): no CPU% across a poll gap, and test CPU time is in ns

A new poll chain starts after the panel was shut or the pane changed;
comparing against the sample from before the gap showed a long-run average
as the current figure. Reset the tracker so the first round shows a dash.

Replace the self-usage test's cpu_ns > 0 (fails on Linux before the first
10 ms tick, passes unconverted mach ticks) with a check that the process's
CPU time covers this thread's own burned CPU time.

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
2026-10-01 15:18:27 +08:00
..