Skip to content

feat: add Apple xctrace perf profiling#755

Open
thymikee wants to merge 1 commit into
mainfrom
feat/xctrace-perf
Open

feat: add Apple xctrace perf profiling#755
thymikee wants to merge 1 commit into
mainfrom
feat/xctrace-perf

Conversation

@thymikee

Copy link
Copy Markdown
Member

Summary

Adds Apple native xctrace collection under the consolidated perf family for #694.

  • Adds perf cpu profile start|stop|report --kind xctrace and perf trace start|stop --kind xctrace.
  • Wires contracts, CLI grammar, daemon projection/routing, typed client/MCP metadata, compact output, help/docs, and tests.
  • Reuses Apple process resolution and xctrace helper patterns while keeping .trace contents as artifacts only.

Refs #697
Refs #694

Touched files: 23.

Validation

Worker validation passed:

  • pnpm typecheck.
  • Focused perf/CLI tests: 5 files, 145 tests.
  • pnpm check:unit: 247 unit files, 2335 tests, 8 smoke tests.
  • pnpm format.
  • pnpm build.
  • pnpm clean:daemon.
  • git diff --check.

iOS simulator E2E:

  • Simulator: iPhone 17, UDID EE00C210-642F-4AAD-B4DE-94892624F5A4.
  • App/session: Safari com.apple.mobilesafari, session xctrace697-final.
  • Baseline perf metrics succeeded; perf frames reported the expected simulator support limitation.
  • perf cpu profile start/stop/report --kind xctrace succeeded, wrote .tmp/xctrace697/final-profile.trace, and honored --out for .tmp/xctrace697/final-profile.json.
  • Compact report included xctrace kind/mode/template/app bundle and bounded summary metadata.
  • perf trace start --kind xctrace --template "Animation Hitches" started and produced a .trace bundle; stop surfaced Apple’s simulator limitation: Hitches is not supported on this platform.

Physical iPhone 00008150-001849640CF8401C was visible and Safari opened, but baseline perf metrics timed out after the daemon 90s request budget before profile/trace verification could safely proceed. The worker cleaned the stale xctrace process afterward.

SkillGym case was added but not runnable in the sandbox because external runner approval was denied.

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstack.github.io/agent-device/pr-preview/pr-755/

Built to branch gh-pages at 2026-06-10 20:30 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.2 MB 1.2 MB +12.7 kB
JS gzip 390.2 kB 393.3 kB +3.1 kB
npm tarball 501.5 kB 504.7 kB +3.2 kB
npm unpacked 1.7 MB 1.7 MB +13.1 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.0 ms 26.7 ms -0.3 ms
CLI --help 41.7 ms 43.2 ms +1.5 ms

Top changed chunks:

Chunk Raw diff Gzip diff
dist/src/session.js +9.2 kB +2.1 kB
dist/src/args.js +860 B +243 B
dist/src/8699.js +905 B +236 B
dist/src/8173.js +634 B +210 B
dist/src/1352.js +702 B +167 B

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