Choose a metric
Define the workload and conditions in the request:
Use the right observation
Each tool answers a different question. None of them proves a bottleneck on its own.
For power, use the same supply, instrument mode, and settling time for every run. A Joulescope always needs an external supply. A PPK2 can supply the target in Source meter mode or measure an external supply in Ampere meter mode. For a long test, ask for streaming or a Joulescope JLS recording instead of one-shot captures. In VS Code, captures open in the Monitor’s Power tab.
Record a baseline
Save the source revision, toolchain, compiler flags, board revision, supply, workload, and measurement method. Repeat the measurement enough times to show its variation, and report more than a single favorable sample. For size:Find a candidate
Ask Embedder to inspect the code path that accounts for the measured cost and propose one specific change. For changes to scheduling, clocks, memory layout, or architecture, run/plan first and review the plan in Plan mode before implementation.
Repeat the unchanged measurement
After the focused change:- Run the relevant correctness tests.
- Build with the same toolchain and options.
- Restore the same target state and workload.
- Repeat the original measurement.
- Compare baseline, candidate, absolute change, and run-to-run variation.
- Check secondary limits such as image size, current, or deadline margin.