From fb1f6259723ab0490e2876809aa530ab0d2e2dde Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 12 Aug 2026 11:43:34 +0100 Subject: [PATCH] node_cpu: document an invocation that runs `python -m mote_bringup.tools.node_cpu` raises `ModuleNotFoundError: No module named 'mote_bringup.tools'`. `mote_bringup/tools/` has no `__init__.py`, so setup.py's `find_packages()` never picks it up -- deliberately, since these are harnesses run from a checkout and not code the robot installs. Every sibling tool documents the path form for that reason; node_cpu was the only one claiming otherwise, in its two usage examples and in the tuning run notes. Use `pixi run node-cpu`, which is the task this tool already ships with and the form camera_layer_decay documents (pixi appends trailing arguments, so `--summary`/`--nodes` pass straight through). Reported by review on #96. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01X6o6x5Nn7QYUMxg2F3Wy2t --- docs/tuning/2026-08-11-monitor-cpu.md | 2 +- docs/tuning/2026-08-11-monitor-cpu/runs.txt | 2 +- mote_bringup/tools/node_cpu.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tuning/2026-08-11-monitor-cpu.md b/docs/tuning/2026-08-11-monitor-cpu.md index 2909b1f..5c6df07 100644 --- a/docs/tuning/2026-08-11-monitor-cpu.md +++ b/docs/tuning/2026-08-11-monitor-cpu.md @@ -10,7 +10,7 @@ to what the callback does can touch. Raw sampler output is in `2026-08-11-monitor-cpu/`; every figure below is a `mean` from one of those JSON files and can be re-derived with -`mote_bringup/tools/node_cpu.py --summary `. +`pixi run node-cpu --summary `. ## How it was measured diff --git a/docs/tuning/2026-08-11-monitor-cpu/runs.txt b/docs/tuning/2026-08-11-monitor-cpu/runs.txt index 059b72b..a80b551 100644 --- a/docs/tuning/2026-08-11-monitor-cpu/runs.txt +++ b/docs/tuning/2026-08-11-monitor-cpu/runs.txt @@ -6,7 +6,7 @@ node per sample plus load1; .json is its summary (mean/median/p95/max). Re-summarize any of them without a robot: - python -m mote_bringup.tools.node_cpu --summary .csv + pixi run node-cpu --summary .csv before-idle.csv 60 s. Stack as found: the drive servos were not answering, so /joint_states was 1.6 Hz and /tf 33 Hz. diff --git a/mote_bringup/tools/node_cpu.py b/mote_bringup/tools/node_cpu.py index 8f15f2d..cbd4ab7 100755 --- a/mote_bringup/tools/node_cpu.py +++ b/mote_bringup/tools/node_cpu.py @@ -6,7 +6,7 @@ compute. Answering that needs a figure per node, before and after a change, on the same workload: - python -m mote_bringup.tools.node_cpu --duration 60 --tag idle \ + pixi run node-cpu --duration 60 --tag idle \ --out docs/tuning/2026-08-11-monitor-cpu/before CPU comes from ``/proc//stat`` as a delta of utime+stime over the interval, @@ -31,7 +31,7 @@ ros2 run mote_bringup health_monitor --ros-args -r __node:=health_monitor_b \ -r diagnostics_agg:=diagnostics_agg_b -r health:=health_b - python -m mote_bringup.tools.node_cpu --nodes health_monitor,health_monitor_b + pixi run node-cpu --nodes health_monitor,health_monitor_b Load average is recorded beside each sample: a percentage of a core means little without knowing how contended the machine was when it was measured.