CPU Hotspot Profiling Workflow
Maintainer workflow for issue #48 / PRD-0056. Default path is credential-free and offline: scripts/profile_cpu.py runs ignored Rust harness tests with a temporary synthetic MC_HOME, no auth.json, credential-looking environment variables removed from child processes, local SSE fixtures, local session/cache/skill data, and no live model-catalog refresh.
Requirements
- All platforms: Rust/Cargo,
python3. - macOS: built-in
sampleandspindump; optional Instruments. - Linux:
perf; optional FlameGraph andhyperfine.
Default credential-free run
python3 scripts/profile_cpu.py --repo . --all --min-seconds 3
Automatic wrapper artifacts:
target/profiling/issue-48/profile-results.json
target/profiling/issue-48/profile-summary.md
target/profiling/issue-48/<scenario>.log
target/profiling/issue-48/tui-render-pipeline.json
The wrapper does not collect .sample.txt files or idle PTY samples. Collect those separately using the manual macOS sampling workflow.
Run one scenario:
python3 scripts/profile_cpu.py --repo . --scenario provider_sse_parser --min-seconds 10
cargo test --release profile_cpu_sse_parser -- --ignored --nocapture
Self-test:
python3 scripts/profile_cpu.py --self-test
Mission Control render pipeline
Default render profiling is credential-free and uses Ratatui TestBackend; it does not enter raw mode, alternate screen, provider transport, network, or real stdout ANSI output. Historical baseline results live in