chore(perf): report per-request operation counts in perf compare

Merged
TH
3d ago
+517-6

Summary

pnpm perf:compare judged timing and failures only. It now appends, per step, what one request used: daemon process spawns, runner command sends, and runner preflights.

  • Each count is the median over successful samples with a request log. more/fewer means outside the range of covered baseline nights.
  • Each count is labelled covered or not instrumented (Android: runner sends and preflights). A measured 0 stays distinct from missing profile and no successful sample.
  • A target with an executable-origin refusal (#5204) gets no count comparison.
  • A change is a workflow warning. Nothing fails the run; a hard budget is a later decision.
  • Counts come from samples[].profile in existing summaries, so earlier nights serve as baseline.

Not counted: client-side, synchronous, and runCmdDetached spawns; status, shutdown, adoption-probe sends. detached: true spawns count: the log doesn't mark them.

Validation

Head 89e3e15bb3: operation-counts Vitest, 10 passed; profile and compare last ran at 64b59a79d5. CI owns other gates.

Warnings replaying nightly artifacts at 64b59a79d5, each against up to 7 earlier nights (all exit 0):

night11-2911-2811-2711-2611-25
iOS (106 steps)044330
Android (105 steps)02100

All 44 on iOS 11-28 are fewer spawns. On 11-27, automation/alert-open shows 18 spawns vs 6 and 13 sends vs 5, beside its timing regression.

Risks: GitHub caps warning annotations per step; timing warnings print first; the job summary lists all. Self-review was a cold re-read, without an independent reviewer.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.