Skip to content

rig harness: gate the host monitor's CPU on the mean (≤ 3 % of a core) - #287

Open
mbreiser wants to merge 1 commit into
mainfrom
claude/host-monitor-mean-gate
Open

mbreiser wants to merge 1 commit into
mainfrom
claude/host-monitor-mean-gate

Conversation

@mbreiser

Copy link
Copy Markdown
Contributor

Summary

The rig acceptance harness (rig/tests/test_ros2_poc.py) now checks the host monitor's own CPU against the mean over the run, with a limit of 3 % of one core. It used to check the median against 2 %.

  • Why: on macOS/Linux, rig_nodes 0.3.1 (0.3.1: host monitor — quantized typed HostStats, cheaper macOS/Linux process sampling (LAB-338) rig-nodes#6) reads the whole process table only every 5 s. Those windows are a minority, so a median hides them; the mean is the honest cost.
    • Lab Mac: median 0.56 %, mean 1.9 %, max 7.4 %.
  • Why 3 %: it leaves room over the Mac's 1.9 % and keeps the 5 s process-table read, so a process that starts using CPU shows up within 5 s. It is still well inside the 5 % budget.
  • Reporting: the harness info line now also prints self_cpu_mean; the median and max are still printed.

Follow-up to #282 (released 2026-10-28).

Tier

Next candidate, alongside rig-nodes 0.3.1 (reiserlab/rig-nodes#6).

Release notes

none (only the acceptance harness changes)

Test plan

  • ww18 (Windows 11, 24 CPUs), released main 59a377b + this change, rig-nodes 0.3.0 from the lock: cd rig && pixi run test gives 60 / 60.
    • Host monitor CPU: mean 0.0151, median 0.0085, max 0.035 cores.
    • /rig/host: 4.7 % of the compressed bag.
  • Mac, after rig-nodes 0.3.1 is pinned: the harness host monitor cost check passes (measured standalone: mean 1.9 %).

🤖 Generated with Claude Code

…), not the median

On macOS/Linux, rig_nodes 0.3.1 reads the whole process table only every 5 s
(--proc-rescan), so those windows are a minority and a median hides them: the
lab Mac measured median 0.56 %, mean 1.9 %, max 7.4 %. The mean is the honest
cost; 3 % keeps margin over the Mac and stays well inside the 5 % budget.
The median and max are still reported.

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

This branch has not been deployed

No deployments
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