Measure performance
measure_performanceMeasure iOS and Android app performance across launch time, scrolling jank, memory leaks, slow frames, and CPU hotspots, returning metrics and traces for diagnosis.
Instructions
Measure performance by metric. launch: startup time, cold, warm or hot, over repeats; trace: why. scroll: jank and frozen frames of a list (x,y or selector). heap: memory leaks, the heap to a file. frames: why frames were slow, hitches, hangs (what). cpu: top functions over seconds. snapshot: CPU, memory, frames, load and heat now (also). Returns numbers, findings, a trace's path; scenario keeps the run for compare_performance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"metric": "<metric>"
},
"name": "measure_performance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| app | No | ||
| also | No | energy (says if a model); anonMemory: by process state, bitmaps; surface: a SurfaceView or game; startInfo: why it last started; battery: wake locks, wakeups, jobs | |
| dsym | No | the build's .dSYM or a folder of them | |
| mode | No | cold | |
| what | No | frames | |
| probe | No | ||
| trace | No | ||
| metric | Yes | ||
| swipes | No | ||
| compile | No | ||
| profile | No | ||
| repeats | No | ||
| seconds | No | ||
| baseline | No | 3 runs, added to compare_performance's baseline | |
| scenario | No | ||
| selector | No | ||
| direction | No | frames, cpu: scroll meanwhile | |
| cpuWindowMs | No | ||
| baselineProfile | No | Android, a release build: in the APK, applied, cold starts with and without | |
| batteryWindowMs | No |