Skip to content

fix: status CPU reports the whole serve process tree - #354

Merged
flupkede merged 1 commit into
developfrom
fix/status-cpu-process-tree
Oct 18, 2026
Merged

flupkede merged 1 commit into
developfrom
fix/status-cpu-process-tree

Conversation

@flupkede

Copy link
Copy Markdown
Owner

The status snapshot measured the serve process alone (ProcessesToUpdate::Some(&[pid])) — during a rebuild wave the scip-csharp helper and its dotnet children do the heavy lifting, so the reported CPU read near-zero exactly when the machine was busy.

The snapshot now refreshes all processes once (so parent links are populated), walks the serve process's descendant tree (platform-independent via Process::parent()) and sums the per-process usage, normalized against the core count as before. Same cpu_percent field and format — the remote TUI and MCP clients see the honest number without any contract change.

Validation: fmt, clippy --all-targets -D warnings, cargo test --lib --bins + full cargo test --test '*' green; the two snapshot handler tests pass unchanged.

The snapshot measured the serve process alone
(ProcessesToUpdate::Some(&[pid])) — during a rebuild wave the
scip-csharp helper and its dotnet children do the heavy lifting, so the
reported CPU read near-zero exactly when the machine was busy.

The snapshot now refreshes all processes once (so parent links are
populated), walks the serve process's descendant tree and sums the
per-process usage, normalized against the core count as before.
@flupkede
flupkede merged commit 987d5e5 into develop Oct 18, 2026
6 checks passed
@flupkede
flupkede deleted the fix/status-cpu-process-tree branch October 18, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant