diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-24 10:09:11 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-24 10:09:11 +0200 |
| commit | c083b40500b0496e1e8e1a32fc31b70b5e9b960d (patch) | |
| tree | 18d4c6aa1a91084aeb7c7bfb3e6aae880f1ca160 /desktop/modules/perf/README.md | |
| parent | 7e14b275e5a9759f0877ef13b9ad338127bec728 (diff) | |
| download | quickshell-c083b40500b0496e1e8e1a32fc31b70b5e9b960d.tar.gz quickshell-c083b40500b0496e1e8e1a32fc31b70b5e9b960d.zip | |
perf: the five heaviest processes in the CPU card, by CPU or RAM
A table under RAM lists the top five processes with their CPU and
resident memory, sorted by either through a toggle in the card. The
toggle re-sorts the frame already held and is not saved.
The rows come from one `top -b -d2` that runs only while the page is
open and dies with it, checked with pgrep. ps was not used: its %CPU is
a lifetime average. top's first frame is the same lifetime figure, so it
is skipped. top marks no frame end but writes each frame in one burst, so
a frame is published once its output has been quiet for 150ms, and rows
appear about 2s after opening, not 4s as when waiting for the next
header.
SplitParser delivered every header after the first as "\ntop - ...", so
the header match is a regex that allows leading whitespace; AGENTS.md
records it. The parser is Perf.js procs(), covered in test_perf.js.
Columns are right-aligned at fixed widths with tabular figures.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/perf/README.md')
| -rw-r--r-- | desktop/modules/perf/README.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop/modules/perf/README.md b/desktop/modules/perf/README.md index 236f5b4..8282a50 100644 --- a/desktop/modules/perf/README.md +++ b/desktop/modules/perf/README.md @@ -31,6 +31,13 @@ VRAM (a scan of every fdinfo, ~14ms every 2s) and the fan, so the page opens on the last minute of network history instead of an empty graph. The mount list, `br0`, the GPU name and the 12 GiB VRAM size are constants in `Perf.qml`. +The CPU card ends with the five heaviest processes, by CPU or by RAM (a +toggle in the card, not saved). They come from one `top -b -d2` that runs only +while the page is open. A frame is published once top's output goes quiet, +and the first is skipped because top computes it over each process's whole +life, so rows appear about 2s after opening. CPU is per core, as top shows it, so a +busy process can exceed 100%. + The cache card runs `du -B1 -d1` once each time the page opens, 28ms over 2 GiB, instead of reading conky's 15-minute `cachesize.txt`. The largest child is yellow, red when it holds over half the total, as conky had it. |
