From c083b40500b0496e1e8e1a32fc31b70b5e9b960d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 24 Oct 2026 10:09:11 +0200 Subject: 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 --- AGENTS.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index da6250d..27af75d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -154,6 +154,13 @@ changing that component. The ones that generalise: the island stuck open after a menu's Quit, with the pointer on the menu. Menus open through a `QsMenuAnchor` instead, whose `closed` signal fires on any dismissal and ends the hold. +- **`SplitParser` can hand a line over with the previous blank line still + attached.** Streaming `top -b`, every frame header after the first arrived + as `"\ntop - ..."`, so `startsWith("top - ")` matched once and the + process table never filled, with nothing in the log. Match with + `/^\s*.../`. A shell pipe shows no such thing, so test the parse inside + `qs`, and capture with a live reader rather than a killed `top > file`, + which flushes on exit and hides buffering too. - **A mouse button nothing accepts does not reliably fall through to a catcher underneath.** The drawer's back button (`BTN_SIDE`, `Qt.BackButton`) never reached a full-surface `MouseArea` below the panel while a page was -- cgit v1.2.3