profile_scenario
Profile app performance by executing interaction steps on a simulator while recording Instruments traces.
Instructions
Record an Instruments trace WHILE executing a scenario on a simulator. This is the primary tool for profiling real user flows — it launches your app, runs interaction steps, and records performance data throughout.
Steps execute sequentially after xctrace starts recording. Supports both simctl steps (deep links, push, appearance, location) and UI automation steps (tap, type_text, swipe, gesture, long_press, snapshot_ui) powered by AXe CLI. UI steps require AXe: brew tap cameroncooke/axe && brew install axe
Returns: Parsed profile results + screenshots taken + scenario execution log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bundle_id | Yes | App bundle identifier to profile | |
| device | No | Device UDID, name, or 'booted' | booted |
| template | No | Instruments template (e.g., 'Time Profiler', 'Allocations', 'Animation Hitches', 'Leaks') | Time Profiler |
| duration | No | Total recording duration (e.g., '10s', '30s', '1m') | 15s |
| app_path | No | Path to .app bundle — installs on simulator before launching if provided | |
| scenario | Yes | Ordered list of interaction steps to execute during profiling |