Performance measurement
Every measurement is read from the platform’s own tools and stored with the raw output it came from
(<measurements dir>/pm-<id>.json and .txt; the MCP server’s --measurements, default
~/Library/Caches/appdyno/measurements). Commands run in the C locale. Nothing leaves the machine.
Words this page uses. The fixture is this project’s own test app (dev.appdyno.fixture), which can add a known cost, such as 500 ms at its start, so that a measure can be checked against it. Host load is the Mac’s 1-minute load average, on 15 cores unless said otherwise. The probe is a small library put into a simulator app to time its frames (below). A kind is the name a number is kept under, such as launch.ttid_ms. The gate calls a change when it judges the change real. A hang is a time in which the app’s main thread did not answer; a frozen frame is one frame of 700 ms or longer.
What each measure read against a known cost, on which device and at what load, is in How the measures were validated.
What works where
Section titled “What works where”A word or two a cell: what each measure does on each kind of device. The tables under it say how each is read, and what it read against a known cost on the fixture. A measure a platform lacks answers UNSUPPORTED with the reason, never zero.
| measure | Android emulator | Android phone | iOS simulator | iPhone |
|---|---|---|---|---|
| Launch | works | works | works | works |
| Compile state | works | works | does not apply | does not apply |
| Baseline Profile | works | not measured | does not apply | does not apply |
| Why launch was slow | works | works | works | works, signed for development |
| Frames, hitches | works | works | works, by the probe | works |
| Frames of a surface | works | works | no | no |
| Frozen frames | works | works | works | works |
| Main-thread stalls | works | works | works | works |
| Memory | works | works | works | works |
| Leaks | no count | no count | works | works, signed for development |
| CPU | works | works | works | works |
| Network bytes | works | works | works | works |
| Energy | modelled | modelled | this Mac’s energy | a score, no joules |
| Why an app started | Android 15 and later | Android 15 and later | no | no |
| Battery signals | works | works | no | no |
| Crashes, ANRs | works | works | crashes only | crashes only |
| Other traces | works | works | works | works |
| App size | works | works | works | no |
| Build type | works | works | works | unknown |
The cells were run on this Mac against a known cost on the fixture, except where they say otherwise, by device-tests/perf.test.ts and device-tests/measures-android.test.ts on 2026-11-03 and 04. The Android phone is a Xiaomi on Android 16 (HyperOS), in Turkish, and One UI against HyperOS says what differs on a Samsung. The iPhone moved from iOS 27.0.1 to 27.2 between runs on 2026-11-04, so a number read on only one of the two versions says which. An emulator’s frames here are drawn on the Mac’s GPU (-gpu host): drawn on its CPU, its frames and start times show only the Mac’s load. The same suites ran on an Android 17 emulator on 2026-11-08, and Android 17 says what it changed.
The model, where nothing else reads: energy = 1 W x CPU time + 200 nJ x bytes, in packages/core/src/energy-model.ts, with modelled: true on its metric and “a model” in the answer. Round figures within the examples of Android’s power profile documentation, to tell runs apart on one device.
Android emulator, API 34
Section titled “Android emulator, API 34”| measure | how it is read, and what it read against a known cost |
|---|---|
| Launch | works: cold 413, warm 180, hot 70 ms by the system’s own report (am start -W); TTFD from “Fully drawn”, a 400 ms delay read as 474 |
| Compile state | works: asked, recorded and reset. A debuggable app stays at verify whatever is asked: only the reset is proven on the fixture |
| Baseline Profile | works, on a release build: present, applied, and cold starts with it and without in turns: 150 Compose controls read 254 ms and 148 ms, 43 % faster, 110 ms over a floor of 38, host load 6-9 |
| Why launch was slow | works: Perfetto android_startups, android_startup_opinionated_breakdown, slow_start_reason, with the finding limits; a 1,500 ms start read as bindApplication 1,537 ms. Perfetto v59.1 has dur_without_trampoline, which is not read |
| Frames, hitches | works: gfxinfo; frame timeline with “App Resynced Jitter” as the app’s; android_frame_stats overrun p95 72 ms on a 40 ms draw against 6 ms on a light one |
| Frames of a surface | works: perf_snapshot also: surface, from dumpsys SurfaceFlinger --latency: a SurfaceView drawn every 30, 40 and 60 ms read 33.5, 25 and 16.7 frames a second, where gfxinfo counts next to none, host load 10-12 |
| Frozen frames | works: perf_scroll from the frame rows as the swipes go, perf_trace from the frame timeline: a 1 s stall in a scroll read as 1 by both. Not settled on this emulator: at host load 28-178 a plain list read 0 and 1, and a stall 5, as frames of 700 ms come by themselves there. To run again on a quiet Mac |
| Main-thread stalls | works: frame timeline, its longest frame; an ANR provoked: a touch on a main thread stuck for 12 s read as one, the app coming back with no dialog answered |
| Memory | works: meminfo; Activities 1, 1, 4 with 3 leaks; java_hprof found 52.9 MB of byte[] against 50; heapprofd on a profileable build, once by hand |
| Leaks | no count: a heap dump has none, and the answer says so; Activities 1, 1, 4 with 3 leaks, as a signal |
| CPU | works: /proc; each thread, the busy one about 2.5 s above 90 % of its 3 s; simpleperf |
| Network bytes | works: dumpsys netstats --poll --uid: 5.39 MB read for a 5.24 MB download |
| Energy | works, modelled: batterystats computes nothing on it (a core busy for 9 s: Computed drain: 0, cpu=0), so the one model: 0 mJ idle, 5,400 mJ with a core busy through the window, host load 50-100 |
| Why an app started | refused by name before API 35. works on API 36: reason, type and phases, a broadcast read as BROADCAST |
| Battery signals | works: wake locks by tag as they are held (dumpsys power), alarms’ wakeups (dumpsys alarm), jobs (dumpsys jobscheduler), no power model and nothing reset: a 30 s lock read as 29.8 s, 6 alarms as 6, 3 jobs as 3, API 34, host load 24 |
| Crashes, ANRs | works: exit-info: Crash raises the count 0 to 1 |
| Other traces | works: Perfetto, read with perf_query |
| App size | works: exact against the APK |
| Build type | works: debuggable from dumpsys package; profileable from a short Perfetto package list (API 34 prints no flag) |
Android phone
Section titled “Android phone”| measure | how it is read, and what it read against a known cost |
|---|---|
| Launch | works: cold 934, warm 307-363, hot 113-126 ms by am start -W; a 400 ms slow start read as 352-382 ms |
| Compile state | works: asked and recorded; a debuggable app stays at verify |
| Baseline Profile | not measured: on a Xiaomi with Android 16 the fixture’s ProfileInstaller answered result=3, an Android newer than it knows, and the measure refused rather than time nothing. A .dm was not tried: install-multiple needs its prompt answered |
| Why launch was slow | works: Perfetto on a 1,500 ms start read 2,358 ms, cold, with its reasons |
| Frames, hitches | works: gfxinfo and frame timeline against the known 40 ms draw |
| Frames of a surface | works: the same on the Xiaomi: 33.3, 25 and 16.8 frames a second, its --list in a form of its own, host load 24-59 |
| Frozen frames | works: the same: a 1 s stall in a scroll read as 1 by both, a plain list as 0, host load 70-440. The summary alone reads 4: it counts each frame twice there, and a stall holds up the next frame too |
| Main-thread stalls | works: frame timeline, its longest frame |
| Memory | works: meminfo within 15 % of 50 MB; Activities 1, 1, 4 with 3 leaks; heap dump, java_hprof, heapprofd |
| Leaks | no count: a heap dump has none, and the answer says so; Activities 1, 1, 4 with 3 leaks, as a signal |
| CPU | works: /proc against one busy core; each thread; simpleperf |
| Network bytes | works: dumpsys netstats on 5 MB over Wi-Fi from this Mac |
| Energy | works, modelled: batterystats, told it is unplugged under its guard, and put back: 0.1 mAh idle, 0.4 mAh with a core busy through 3 s; a run with no growth gets the one model. The count since the last charge goes on: 24.6 s, 31.4 s, 38.5 s, 45.9 s over three reads at level 100, full |
| Why an app started | works: on Android 16 from dumpsys activity start-info: a 500 ms onCreate read +488 ms |
| Battery signals | works: the same on the Xiaomi: 29.6 s for 30 s, 6 for 6, 3 for 3, its count on battery unchanged, host load 19-23 |
| Crashes, ANRs | works: exit-info: Crash raises the count 0 to 1 |
| Other traces | works: Perfetto, read with perf_query |
| App size | works: exact against the APK |
| Build type | works: debuggable from dumpsys package |
iOS simulator, iOS 26.5
Section titled “iOS simulator, iOS 26.5”| measure | how it is read, and what it read against a known cost |
|---|---|
| Launch | works: until the first read; with the probe, process start to first frame, a 500 ms slow start read as 482; XCTApplicationLaunchMetric 0.75-1.5 s. no: xctrace’s App Launch template makes a recording, but its launch tables are empty |
| Why launch was slow | works: the probe’s phases (load, main, uikit, first_frame) and a Time Profiler from the first instruction: a 500 ms slow start read as main +505 ms, host load 50-280. no: xctrace’s App Launch template makes a recording, but its launch tables are empty, with --launch too |
| Frames, hitches | works, relaunching the app once, no argument: the probe: perf_scroll on a plain list 0-5.5 % missed, p95 17-29 ms; on a 40 ms draw 100 % missed, p95 52-66 ms, host load 50-280. Main-thread pacing, not GPU, on the Mac’s speed. no: Animation Hitches refuses; XCTHitchMetric records no value |
| Frozen frames | works: intervals of 700 ms or longer, main-thread pacing: a 1 s stall in a scroll read as 1, a plain list as 0, host load 50-280 |
| Main-thread stalls | works, no argument: the probe read a 500 ms stall as 553 ms at host load 170-470, an earlier run 522 ms; the test’s 10 % holds on a quiet Mac |
| Memory | works: footprint; leaks 0 to 10 on 10 retain cycles; memory graph |
| Leaks | works: leaks: 0 to 10 on 5 retain cycles of two objects |
| CPU | works: ps, Time Profiler |
| Network bytes | works: nettop: 5,000,100 bytes for 5 MB. no: the Network template says “not supported in the Simulator” |
| Energy | works: ri_energy_nj of the app’s process, this Mac’s energy: 0 mJ idle, 2,873-3,252 mJ with a core busy through the window, host load 50-280. no: Power Profiler refuses the simulator |
| Crashes, ANRs | works: crash reports (crashes), counted in the row. iOS has no count of ANRs |
| Other traces | works: xctrace templates, digested by perf_query |
| App size | works: bundle bytes on disk |
| Build type | works: .debug.dylib or get-task-allow |
iPhone 13 Pro Max, iOS 27
Section titled “iPhone 13 Pro Max, iOS 27”| measure | how it is read, and what it read against a known cost |
|---|---|
| Launch | works: until the first read, a 500 ms slow start read as 517; XCTApplicationLaunchMetric 0.19-0.20 s. App Launch’s phases add up to 199-253 ms |
| Why launch was slow | works, on an app signed for development: App Launch with --launch, by its phases: a 500 ms slow start read as main +509 ms on iOS 27.0.1, +513 ms on 27.2, host load 100-300. A system app refuses: it needs get-task-allow |
| Frames, hitches | works, no argument: Animation Hitches recorded around perf_scroll’s swipes: 423-537 frames, 0.2-2 % hitches on a plain list on iOS 27.0.1, 544 frames on 27.2; perf_trace the same with their ratio and causes. unproven: XCTHitchMetric runs and reads all zeros |
| Frozen frames | works: hitches and hangs of 700 ms or longer, one moment counted once: a 1 s stall in a scroll read as 1 (hang 1,016-1,020 ms; as a hitch 1,008 ms in one recording of four, 12-50 ms in the others), a plain list as 0, on iOS 27.0.1 and 27.2, host load 15-330 |
| Main-thread stalls | works: the hangs of the recording, in perf_scroll and perf_trace; Time Profiler’s potential-hangs: a 500 ms stall read as 513-515 ms on iOS 27.0.1 and 27.2 |
| Memory | works: Activity Monitor: +50.7 MB against 50 |
| Leaks | works, on an app signed for development: Leaks template, attached, 15 s: 10 retain cycles of two objects read as 20 leaked objects, 640 bytes, a screen with none as 0, on iOS 27.0.1 and 27.2, host load 50-330. A system app refuses: no task port |
| CPU | works: Activity Monitor; Time Profiler: the busy loop 98.9 % of samples, as addresses in a Release build |
| Network bytes | works, any app: Power Profiler instrument, attached: 5,322,836 bytes on iOS 27.0.1 and 5,322,756 on 27.2 for a 5,000,000 byte download (+6.5 %), straight to this Mac, no proxy on its path. no: the Network template and the Network Connections instrument crash at stop; HTTP Traffic left out, as it keeps traffic unencrypted in its trace |
| Energy | works, any app: Power Profiler instrument, attached, on a cable and charging: impact 1.7-1.9 idle, 18.6-19.1 on a busy core on iOS 27.0.1; 1, 18.3 on 27.2: a relative score by subsystem, no joules. no: the template fails or crashes; over every process it has no app’s rows |
| Crashes, ANRs | works: crash logs (crashes), counted in the row. iOS has no count of ANRs |
| Other traces | works: the same |
| App size | no: no tool gives it |
| Build type | unknown for a development-signed app; Settings reads as release |
One UI against HyperOS
Section titled “One UI against HyperOS”Every cell above works on both, by the same suites on 2026-11-04: a Samsung SM-A525F (One UI 6.1, Android 14, a user build, en-US, 1080x2400, 90 Hz) and the Xiaomi 25078RA3EY (HyperOS 3, Android 16, tr-TR, 720x1600, 60 Hz). What differs is this. Host load was 15-290.
| One UI | HyperOS | |
|---|---|---|
| A USB install | nothing of its own; Play Protect looks only with “Verify apps over USB” on, off as found | its own prompt before each new install, which app install answers |
| Screen off | Dozing, as it has an always-on display |
Asleep |
| Lock after the screen goes dark | within 3 s | later than that |
| A window always over the app | the launcher’s edge panel handle, a strip on the right side, which is no screen and no alert | a gesture handle at the bottom |
/proc/loadavg |
hidden: three zeros with tasks running, shown as ? |
read: 14-17 at rest, 14 of it parked kernel threads |
/proc/pressure/cpu |
read: 2.3-6.1 through these runs | closed to the shell |
| The hardware encoder | OMX.qcom.video.encoder.avc, which refuses a format with a decoder’s low-latency key |
c2.mtk.avc.encoder, which takes it and does nothing with it |
The mirror on auto |
576x1280 of 1080x2400: 81 frames/s, touch 103-107 ms, capture to arrival 24-25 ms; the display’s size at --quality high: 89 of 90, touch 217 ms, 69 ms |
its display’s 720x1600: 60 of 60, touch 92 ms, capture to arrival 31 ms |
| A read of the fixture’s screen | 165 ms, 88 nodes, 19 of them the app’s | 44 ms, 48 nodes, 5 of them the app’s |
A FLAG_SECURE window |
the mirror stays live; screencap gives no bytes, and screenshot a black picture |
the mirror stays live; screencap a black picture, and screenshot refuses, saying why |
| The fixture’s launch, cold and hot | 499-506 ms, 84 ms | 934 ms, 113-126 ms |
Bitmaps in dumpsys meminfo |
not listed, as on any Android 14 | listed |
A Baseline Profile
Section titled “A Baseline Profile”perf_launch with baselineProfile: true, on a build that is not debuggable: a debuggable app stays at verify whatever is asked, and is refused. On a cold start it says three things.
| what | read from | what to know |
|---|---|---|
| present | assets/dexopt/baseline.prof in the installed APK, unzip -l on the device |
no profile, no more is done |
| applied | status in dumpsys package dexopt |
not reason: a .dm for another range of API installs with no word and reads status=verify reason=install-dm, and the answer calls it delivered with nothing compiled; Android 17 refuses its install. A build’s folder holds one .dm per range |
| worth it | cold starts at verify and at speed-profile, in 3 turns of repeats each |
the profile goes in by ProfileInstaller’s broadcast, which result=1 confirms, and each turn’s status is read. pm dump-profiles gives its rules from API 34 |
The starts with and without the profile take turns, so that the Mac’s drift falls on both, and a change is called on the rank test and the floor of the gate. The profile goes in again before each turn, and an app with neither ProfileInstaller nor a .dm is refused rather than timed with nothing compiled. The app ends as an install leaves it, and a profile it gathered in use goes with that. The two numbers are kept as launch.without_profile_ms and launch.with_profile_ms, under the scenario launch-baseline-profile. What a phone gains has not been measured: ProfileInstaller refused the only phone tried.
How this was checked, and on which devices: the evidence.
The gate
Section titled “The gate”Every measure’s numbers are kept as records (packages/perf): kind, median, samples and spread, source command, raw output
file, device and OS, virtual or physical, build type, compile state, host and device load, thermal state, tool version and
time. A run goes to <measurements dir>/runs/<app>/<scenario>/<device class>/. A baseline goes to
.appdyno/perf/baselines/<app>/<scenario>/<device class>.json (APPDYNO_PERF_DIR moves it), which can be committed. Limits
go in .appdyno/perf/budgets.json: a list of { "kind": "launch.ttid_ms", "max": 2000 }, with app, scenario, deviceClass
and min optional. perf_compare budget with kind and max or min writes one there, in place of a rule of the same kind and scope, and needs no run measured (appdyno perf budget --app A --kind launch.ttid_ms --max 200). A kind no measure keeps is refused, with the kinds of that name it may have meant. A kind none of the app’s kept runs holds is kept all the same, and the answer says so and names the kinds they hold.
| command | what it does |
|---|---|
appdyno perf-launch --app A --mode cold --repeats 6 |
measures a run and keeps it |
appdyno perf baseline --app A [--last 3] |
adds the newest run, or runs, to the baseline, each once; exits 1 until it holds 3 runs and 5 samples of a kind |
appdyno perf compare --app A [--format text|json|junit] |
exits 1 on a regression, a broken budget, or a change it could not judge |
appdyno perf budget --app A |
checks the budgets only |
appdyno perf why --app A |
does what compare does, and on a regression looks for its cause |
The tool perf_compare does what the last four do, its action naming which: baseline, compare, budget or why. Why it got worse says what perf why runs.
How a change is called. A number that did not move past its floor is ok. The floor is the largest of a floor by unit (15 % and 10 ms for times) and 4 standard deviations of the baseline’s run medians. Past the floor, the gate needs 3 baseline runs and at least 5 samples on each side, else few-samples: a change it could not judge, which is no pass and exits 1. Then a rank test of all the baseline’s samples against the run must give p under 0.01 (by permutation, as whole milliseconds tie; 4 against 4 cannot reach it). A better change the test confirms is an improvement; a better one it does not confirm, or a worse one at p 0.05 or more, is ok. A worse change at p from 0.01 to 0.05 is noisy and exits 1: measure again with more repeats, as a few slow samples on either side hide a real change from the test (on a simulator, 600 ms put into the start read +754 ms past a floor of 415 ms with p 0.033, against a baseline with launches of 6.4 and 3.9 s, which the test alone would have passed). A worse change the test confirms, in a run or against a baseline measured under high load, on a hot device or with a mirror open, is noisy too and exits 1, as the gate cannot tell the change from the load; any other is a regression, and exits 1. A kind every run of a baseline of 3 or more holds and this run lacks is few-samples too, as a screen that stops drawing keeps no frames: changing a flow’s steps stops its gate until the baseline is taken again.
What load keeps out of a baseline. A number measured with host load over 0.8 a core (on a virtual device, or a number timed through this Mac), on a busy or hot device, or with a mirror open, is left out of a baseline and named, and the rest of its run goes in; a run with nothing else is refused as a baseline. On a Mac that is itself a virtual machine, as a CI runner is, the load average says nothing of how busy it is (a GitHub runner of 3 cores read 115 to 650 at rest), so it is not read: the number says host-load-unread, which stops nothing and keeps nothing out, and the gate’s own tests judge the noise. APPDYNO_HOST_VIRTUAL=0 reads it on a virtual Mac all the same. A run whose build or compile state differs from its baseline’s is refused and exits 1, naming both sides. A number with no baseline is new, and passes where its scenario has a baseline, as a step put in does; a scenario with neither a baseline nor a budget was judged by nothing, and exits 1. A phone whose load, pressure, share at work and heat could not be read says device-state-unread beside its numbers: that stops nothing and keeps nothing out of a baseline, but a device unread is not a device known to be calm. A virtual device’s state is this Mac’s, which is read.
How this was checked, and on which devices: the evidence.
Kept traces
Section titled “Kept traces”Traces and heap dumps stay on this machine, up to a limit: 10 GB by default, --trace-limit-gb or APPDYNO_TRACE_LIMIT_GB to change it. appdyno perf prune [--limit-gb N] [--dry-run] or perf_compare action: prune brings them down to it and lists what it removed; a dry run lists the same and touches nothing. Each removal goes in traces-pruned.log in the state folder, with its time and size. A simulator’s frame probe reads are counted with them. The server and the command line also look when a run or a measurement is kept, or the flight recorder saves a page, at most once an hour. Nothing else that makes a context does: not the library, and not a test.
They go oldest first, and never what a baseline took its numbers from, what one of a scenario’s 30 newest runs names, or what is under a day old, so it can stay over the limit, and says so. A baseline holds samples and no path, so the way there is the baseline’s run time to the kept run, the run to its measurement, and the measurement’s two files to the trace. Taking a baseline also pins what it took, in traces-pinned.json, as one project cannot see another’s baselines.
What it does not know, it does not delete. It goes by one state folder: it reads that folder’s measurements, and removes only direct entries of that folder’s traces and measurements that are traces or heap dumps. With no kept run to go by, or a run, a measurement, a baseline or the pins it cannot read, it removes nothing and says why. A context with --measurements elsewhere is refused: the traces are not its runs’ to speak for. A link is not followed, and a linked traces folder stops it.
Why a slow frame was slow
Section titled “Why a slow frame was slow”On Android, perf_trace records what each frame’s main thread did and answers for the frames that missed their deadline (android_frame_stats, overrun over 0): how long a frame it spent waiting for a monitor (android_monitor_contention), in binder calls (android_binder_txns), waiting for the collector (GC: Wait For Completion), and from thread_state at work, waiting for a CPU, blocked in the kernel or asleep with nothing named holding it. A wait is also a sleep, so it is taken out of the sleep. One is named only at 10 ms a frame or more and 40 % of the time or more; otherwise the frames are unexplained, which is said, not guessed at. The window is the frame’s doFrame, so a stall before it began, or on the render thread, reads as unexplained.
How this was checked, and on which devices: the evidence.
Why a hang was a hang, and which function moved
Section titled “Why a hang was a hang, and which function moved”iPhone, busy or blocked. perf_trace what: hangs answers each hang as Apple triages it. A Time Profiler trace holds no thread-state table on a phone, but it samples only a thread that runs, so the hung thread’s samples inside a hang are how much of it was on the CPU: at half or more it was busy, in what ran most, and below that blocked, in what it ran last. Nothing new is recorded. The function is the app’s innermost, an address where the build has no symbols, and dsym on perf_trace or perf_profile names it. Of a blocked thread the last sample may be thin: a Release build’s closure has read as main.
dsym, a .dSYM or a folder of them, names frames with atos, from the addresses and the load address the export has, and refuses a dSYM of no build in the trace. It names what is read, not the trace on disk: perf_query still sees addresses. A perf_profile given no dsym whose app functions are all addresses says so, and what makes the dSYM: DEBUG_INFORMATION_FORMAT set to dwarf-with-dsym, a Release build’s default and not a Debug build’s, which leaves it beside the .app in its build folder or in its archive.
A function-level diff. perf_compare action: functions with two ids of perf_profile, or appdyno perf functions --from pm-a --to pm-b: what moved, in ms of CPU in each second so that windows of other lengths compare, the app’s own functions where the profile has them. A function must move 20 ms a second and a quarter of itself, so two runs of the same work name nothing. A profile keeps 200 functions, and an answer shows 15. Android’s names are what simpleperf finds on the device: Java functions of a debuggable build, once compiled, and the first run of a screen may read as the interpreter.
How this was checked, and on which devices: the evidence.
Why it got worse
Section titled “Why it got worse”appdyno perf why is the gate, and on a regression it looks for the cause by itself, on the same device, the same build and the same journey, and writes one answer: what got worse and by how much, how sure the gate is, against which baseline and which run, and the likeliest cause with what shows it. The same comes through perf_compare with action: why, in answers, and on the dashboard. It fails as perf compare does: exit 1 on a regression or a broken budget.
| command | what it does |
|---|---|
appdyno perf reference --app A [--scenario S] [--device S] [--dsym D] |
on the baseline’s build, keeps the other side of a later diff |
appdyno perf why --app A [--scenario S] [--device S] [--dsym D] |
the gate, and on a regression its cause |
appdyno perf comment --app A --out comment.md |
writes the answers to a file as Markdown; needs no device |
Only a regression is looked at. Every call is the gate’s own, with its rank test, floors and run-to-run limit. A run with no regression touches no device, and noisy, few-samples and refused are said and nothing runs: noise is not a regression. What a look reads is kept as a measurement and never as a run, so it cannot become the newest run the gate compares.
A look leaves the device as it found it. A look can bring up a simulator’s runner, and with one up the same assert read from 11 ms to 39 ms, as a read then goes another way: a first version had the gate rightly call that on the next run of an unchanged app. So a look stops what it started, and a runner that was up before it stays up.
What runs, by the number that moved.
| number | what runs | what it can name |
|---|---|---|
| a start | one traced start, as perf_launch trace |
the phase that rose, against the reference |
| a journey’s step | the flow replayed, a first time left out, with a recording around that step alone | the function that rose, and what the main thread did |
| frames, frozen frames, stalls | the swipes the run did, recorded twice: a CPU profile, and a frame or hang trace | the same |
| CPU | a CPU profile of what the app does | the function that rose |
| memory, network, energy and the others | nothing | that no measure here explains it |
A journey’s whole goes with the step that moved most. A step that starts the app is looked at as a start, and in a step that stops it the app does not run, which is said.
Why a reference. A function diff needs both builds, and once a regression is there only one is installed. perf reference, with the baseline’s build installed, keeps a CPU profile of each step of the journey and the phases of a start in .appdyno/perf/references/, beside the baseline, so that it can be committed. One of another build type or compile state is not used, and the answer says so. With none, the answer says what it would take; what needs no other side, a frame’s cause or a hang’s, is still read.
A cause is named only with what shows it.
- A function, by the same diff as
perf_comparefunctions, in ms of CPU in the step: it must pass the diff’s floors and account for 40 % of the change or more, the bar a frame’s cause is held to. Below that it is evidence, and no cause is named. - A profile that counts callers in, as a simulator’s does, has a caller rise as far as what it called, so
mainrises with everything. Of those that rose about as far, the deepest is named. - A phase by the gate’s floor for a time, and the same 40 %.
- A frame’s cause and a hang are read straight from the run’s trace: why a slow frame was slow.
- A profile sees what is on the CPU, and a frame trace what the main thread did in its frames. A sleep in a touch’s handler holds up no frame in flight, so it shows in neither, as a timer or a wait for the network does not: the answer says no cause was found and why, not the nearest thing that moved.
- If the change does not show again while it is looked at, that is said: what was read may not be that change.
On a phone the gate goes by the phone. What the phone timed itself is called whatever the Mac is doing, and what was timed on the Mac is left out of a baseline by name. If the gate could judge the numbers the phone timed itself, a change in a number timed on a loaded Mac is only a note and fails nothing. If it could judge none of the phone’s own numbers, that change fails the run as noisy, as it does on any device. On an iPhone perf_launch is timed on the Mac, so a loaded Mac refuses the run whole; with trace: true its phases are the phone’s own, one sample a run. A phone that is hot, or busy, is refused: that is the phone’s own state, and the gate is right. On a phone a function is an address unless --dsym names the build’s dSYM, on perf reference and on perf why. On an iPhone a hang trace sees a wait too, so a sleep in a touch reads as a blocked hang, in what ran last, and not as no cause.
How sure. The gate’s own numbers beside each answer: p, the samples on each side, the baseline’s runs, and how many times its floor the change is. A modelled number stays (modelled) and one timed on this Mac (timed through the host) on every surface, and a virtual device’s answer says what the dashboard says of one.
A replay’s values come from the environment. A value given by --param is not kept, as it may be a secret, so a flow that needs one has it set, or the answer says which it lacks. A flow changed so that a step is no longer that step is said, and not timed.
The comment. perf comment reads what perf why kept of the newest run of each scenario, and an answer of an older run is not used. All that comes from the app is escaped, as a pull request can name a function anything and an @name would notify someone. A body is cut at 60,000 characters. perf-gate.yml is a job to copy: see On a pull request.
How this was checked, and on which devices: the evidence.
Why an app started
Section titled “Why an app started”On Android 15 and later, perf_snapshot with also: startInfo reads dumpsys activity start-info, with no trace: the reason of the newest start, its type, whether it followed a force stop, and where its time went, for the starts the system keeps. Each phase of a start since the last run of the key also goes to the row “Why launch was slow”, as the system keeps a start for as long as it likes. The first run to read a start keeps no phase of it, as nothing says it is new. The time inside Application.onCreate is in oncreate_to_first_frame, not before it. Before Android 15 the measure is listed as not measurable, with the reason kept. Reading it needs the app running, as perf_snapshot does: a process up for a broadcast counts, and reads 0 frames.
How this was checked, and on which devices: the evidence.
A journey
Section titled “A journey”appdyno test <flow> --measure or flow run with iterations. A first run is left out, as a measured launch leaves out its warm-up, and the iterations (5 by default: the gate calls nothing under 5 samples a side) make one kept run of the scenario journey-<path>, the file’s path in its repository with - for each /:
| kind | what |
|---|---|
journey.total_ms |
each iteration’s steps added up |
journey.<n>_<line>.ms |
the device’s own count from the action to a settled screen; launch, open_link, scroll_to, wait_for, assert and what has no such count are the action on this Mac’s clock, throughHost |
journey.<n>_<line>.frames_p95_ms, .frames_worst_ms |
the step’s frames: reset before its action, read after it settled; none when it drew nothing |
journey.<n>_<line>.memory_kb |
what perf_snapshot reads, after it settled |
journey.unsettled |
how many of an iteration’s steps never settled: such a step, and its iteration’s whole, are counted at the tool’s deadline, which they took at least, so that a step slowed past it reads as slower and nothing reads as better than it was; its frames and memory are read at that deadline |
The reads are between the steps, so they cost time but are in no step’s number. A step after which the app does not run has no reading, and the run goes on.
A measure inside a flow. A perf_* call during a recording used to be written as unrecorded, which stopped the replay. A measure is the agent measuring, not the journey, and a journey now has its numbers from --measure, so what it did to the screen stays as the plain steps that do the same and nothing stops: perf_launch cold is stop, launch, warm or hot is launch; perf_scroll is its swipes; perf_trace or perf_profile with scroll is 4 swipes; XCTest’s own test is stop, launch. What leaves the screen as it found it writes nothing, and so does a call refused after the probe’s relaunch.
How this was checked, and on which devices: the evidence.
One timeline
Section titled “One timeline”A timeline puts what happened in a journey on one clock, in one HTML file: the video, touches, steps, frames, requests, traffic, the log and memory. Click a slow frame and the video goes to that moment, with the requests and the log lines around it. The file opens with no server and no network, and can be sent to someone.
appdyno timeline --app com.example.app --flow journey.flow # a flow, or --seconds 30 of your own handsThrough the server: report timeline, then the journey, then report stop; a session’s end writes it too. A timeline lasts at most 180 s, as past one recording’s segment the video’s own times are lost. It writes timeline.html beside the report, and a video over 64 MB stays beside the page, with the page saying so. A perf_* run during it is marked mirrored, as an encoder is at work on the device. Its frames each second are what the counters grew by, as a reset would cut the window a perf_scroll counts from its own: one that reset them every second left a list janking on every frame at 0 % on an Android 14 emulator, against 97 % alone, and now reads 98 %; on a simulator it left 0 frames, and now 100 % as alone. The second in which another measure begins its own count has no frames.
One clock
Section titled “One clock”Everything stands on the device’s own clock. What was read there needs nothing done to it, and what was read on the Mac is moved by an offset that is measured at both ends of the run and never assumed: an emulator’s clock read 25 to 31 ms ahead of this Mac, an iPhone’s 2 ± 1 ms, a simulator’s 0 ± 1 ms. The offset comes from the agent’s ping, answered past the queue: the shortest round trip of eight, half of it the bound, and a millisecond for Date.now()’s own tick. It has to be the shortest: of 24 reads of adb shell date under load, one was 254 ms out.
The page says how far off each row can be, and two rows can be apart by at most the sum of their figures:
| row | read on | placed by | within |
|---|---|---|---|
| Video, Android | device | each frame’s own time, in the metadata track screenrecord writes |
±40 ms |
| Video, simulator | Mac | when its recording began, as measured of this recorder | ±150 ms |
| Video, iPhone | Mac | when its stream began, as measured: it has no steady lead | ±620 ms |
| Frames, touches | device | the trace’s own clock snapshots (to_realtime) |
±1 ms |
| Frames, simulator | Mac | the probe, which reads the wall clock | ±1 ms |
| Frames, iPhone | device | the date their trace began | ±215 ms |
| Log | device | the time on each line | ±1 ms |
| Steps, requests | Mac | the offset | about 1.5 ms |
| Memory, traffic | Mac | the offset, and a reading is taken somewhere in its second | ±1 s |
A stall no frame shows
Section titled “A stall no frame shows”Android’s frames are blind to one common stall. A main thread held up in a click, with a ripple drawing on the render thread, drew no long frame in Perfetto’s timeline: a 1500 ms hold read a longest frame of 27 to 38 ms on an emulator, 59 on a Xiaomi and 64 on a Samsung. The frame timeline has no row of it either, by actual or by expected time. gfxinfo read 21 ms on the emulator, and on the Xiaomi 1525 ms in one run of two, so it cannot be gone by. What says so is Choreographer’s own line in the app’s log, Skipped 90 frames!, at the moment the thread came back: 90 × 16.7 ms is the 1500 ms put in.
So the page takes those lines as its Stalls row, 1483 ms on the emulator and 1499 on the Xiaomi, by the refresh its frames show, and leaves out one a long frame already shows: one stop is one row. perf_trace does the same: stalls.worst_ms is the longest frame or the longest such hold, whichever is more, and its answer has heldMs and says the number came from that line. The flight recorder watches for it too.
Where this does not reach. A Samsung with One UI writes no such line: none in the log of a run with that same hold, whose Taps: 1 shows it ran. There such a hold shows nowhere, and the page says so. The line comes only past 30 frames skipped, so a shorter hold shows nowhere on any device. perf_scroll goes by what it reads while it scrolls, which is driven by the main thread, and does not read this line.
What each device gives
Section titled “What each device gives”| row | Android | iOS simulator | iPhone |
|---|---|---|---|
| Video | yes, each frame stamped | yes, placed within 150 ms | yes, HEVC, placed within 620 ms |
| Frames | yes: every frame, with Perfetto’s verdict | yes: the probe, which relaunches the app | its hitches and hangs only, placed within 215 ms |
| Stalls | by the log’s Skipped frames, but not on One UI | a long frame shows them | a hang shows them |
| Touches | yes: what reached the app, from anyone | no: Steps are what this tool sent | no: the same |
| Requests | through a proxy capture | through the probe or a proxy capture | through a proxy capture |
| Log | yes | yes | no: devicectl cannot read a running app’s log |
| Memory | yes, every 5 s | yes | by its own instruments |
A row a device cannot give stands empty, with the reason its device gave. Android was run on an emulator (Android 14), a Xiaomi (Android 16) and a Samsung A52 (Android 14); the iPhone is a 13 Pro Max.
What the file holds
Section titled “What the file holds”The page says this at its top: it gets sent to people.
- The screen, as a video. It is not painted over: what was on the screen is in the file, a password field’s dots and all.
- The app’s log lines, with listed secrets and what looks like a credential hidden. That hiding goes by patterns, so a person’s name or an address in a line stays. Read them before you send it.
- Requests by method, host and path. No query, which is where a token rides, and no body: this tool keeps none. A path can hold an id.
--full-urls, orAPPDYNO_FULL_URLS=1, keeps the query, with a credential in it still hidden. It is a flag of the person who starts the tool, and no argument an agent can pass. - Steps by name: no text that was typed.
The page’s one script is allowed by its hash, so a second script on it does not run, whatever a log line holds: tried in Chrome. The video goes inside as base64, read by that script into a blob. Chrome played an MP4, a simulator’s QuickTime file and an iPhone’s HEVC so, and went to the moment asked. Safari has not been tried.
The flight recorder
Section titled “The flight recorder”appdyno flight --app com.example.app --seconds 30 # until Ctrl-C; through the server, report flight, report stopIt keeps the last N seconds of an app as a timeline, 30 by default, from 20 to 120 (--flight-seconds, APPDYNO_FLIGHT_SECONDS), and saves them when the app crashes or stalls. It is off until a person turns it on, and it ends with its session, or at report stop, which also writes a report open beside it.
What sets it off. The signals the measures read: a frame of 700 ms or more or a frozen frame, a stop of a main thread in its log, and a process gone with a crash report. It looks every 5 s, as a look costs the device and nothing is lost by waiting: the ring holds the moment, a frozen frame stays counted until it is read, and a log and a crash report stay. A look queues behind what the device is doing: they came 14 and 22 s apart on an emulator at host load 33 to 41, which is why it keeps no less than 20 s. It goes by the process, not by whether the app runs: Android restarts a crashed app within the second, and a look at pidof then finds one running. A process gone with no report is one a person closed, and nothing is kept. A stall is saved 2 s after, with the screen coming back, and one that repeats is one to look at: none is saved within N seconds of the last, and at most 20 in a run.
What it holds, and where. The frames in Perfetto’s ring on the device, sized for N seconds. The video on this Mac in three overlapping segments of N/2 seconds at 1 Mbit/s, so nothing falls between two. A Samsung A52 runs one encoder: a second screenrecord makes its file and dies at the first frame, Encoder failed (err=-38), however long it is given. There the old segment ends first, and what passes while the new one starts is not filmed; ending one took 0.6 to 0.9 s. An open window holds that encoder too, so a recording under one refuses at its start, in 0.7 to 0.9 s there, and the window goes on. Both are gone when it stops. A saved page goes in traces/, as <app>-flight-<time>.timeline.html, with the trace of that stretch beside it, and both go by the rules of kept traces: nothing under a day old goes, and past the limit the oldest go first. report write saves now. A session that starts after a process died clears what that process left on this Mac; what it left on the device ends by itself: in a run with its owner killed every screenrecord was gone within 45 s and Perfetto within its 10 minutes, and the next timeline removes the file Perfetto leaves.
What it costs. It looks at the device every 5 s, and it does cost something: it is for a run a person means to look at, and a perf_* run during it is marked mirrored. On a Xiaomi a look every 5 s took the phone’s whole CPU about 9.5 points higher. What it holds on this Mac is at most three segments of N/2 seconds at 1 Mbit/s, so 5.6 MB for 30 s.
How this was checked, and on which devices: the evidence.
A second recording, and an iPhone’s heat
Section titled “A second recording, and an iPhone’s heat”Two recordings at once refuse by name. Xcode’s trace tool, given a second recording, fails to lock the performance counters and leaves an empty trace, so recordTrace holds a device across processes, and a second gets DEVICE_CLAIMED naming the first, a dead holder’s file being taken over. On the iPhone the second refused and the first kept its trace. A recording by another tool shows only as that failure, which refuses the same way. Android’s Perfetto takes sessions side by side, so it has no such rule.
An iPhone’s thermal state. No tool answers this by itself, but every recording but a lone Power Profiler instrument holds device-thermal-state-intervals, so a measure reads the state its recording ended in, up to 5 minutes old, on Android’s scale that a run’s noise is judged by: nominal 0, fair 1, serious 2, critical 4. A measure with no recording in the last 5 minutes, such as a launch alone, has none. On the iPhone it read 0.
The dashboard
Section titled “The dashboard”| command | what it does |
|---|---|
appdyno perf survey --app A [--device S] |
runs every measure on that device in turn, then writes the page |
appdyno perf dashboard [--app A] [--out dir] [--open] |
writes the page alone, from what is kept; needs no device |
perf_compare with action: dashboard writes the page too, in its usual place: <measurements dir>/dashboard/index.html. --out and --open are the command line’s alone. The page is rewritten after each kept run and each baseline, and an open page reloads itself every minute, which closes a table left open. A failure to write it never fails a measurement.
perf survey calls the same operations anyone can, and names no device: what reads each measure is tried in turn until the measure has a number, a refusal is kept as that measure’s answer for that app on that kind of device, and the next measure still runs. Every operation keeps its refusals the same way, except what the caller turned off (probe: false) and a way the device has another of (no hangs where the frame trace reads stalls); a refusal about a part of a row (threads, a CPU profile) stands for no row. A call that ran and kept no number for that measure, or failed for another reason such as a timeout, is printed and not kept: neither says what the device cannot do. One line per measure.
There is no server, and the page is one file with no script, which loads nothing: its content policy allows only its own style. Everything from the store is escaped. It follows the system’s light or dark, and prints as ink on paper with no tooltips or tables. An app has a section of its own, with an anchor. In order:
- What needs attention, across every app, for the newest run of each scenario: regressions and broken budgets as
perf comparecalls them, with the causeperf whynamed of that very run, and runs under high load or heat. An app with a regression opens with Why it got worse, the same answer the command line gives. A debuggable build is said beside its number but is no alarm. It says how many scenarios have a baseline and how many budget rules there are, since “nothing needs attention” means little without them, and which files could not be read. - Measures by device. The row
Journeysholds the newest journey on that device, its whole time, its slowest step and the steps the gate calls slower. Above the table: that an emulator’s or a simulator’s numbers are relative to this Mac and that real frame rates, frozen frames, hitches and energy need a phone, and, with no phone measured for the app, the command for one. A cell holds the newest reading of that measure on that kind of device, with its unit, kind, scenario and age; an estimate from a model is marked; so is a reading under noise; and on a simulator it says when the number is something else: main-thread pacing for frames, frozen frames and stalls, this Mac’s energy. A refusal newer than any reading gives its reason instead. Otherwise “not measured yet”. A kind no measure answers has a row of its own under “other”. Emulators and simulators read as relative, and the page says so. - Trends, for a kind with more than one run on a device: one small chart per kind, scenario and device, each with one y-scale, from zero, with the runs evenly spaced. The shaded band is the baseline’s median plus and minus the floor of the gate above: a run outside it has moved past the floor, though the call needs the rank test as well. A budget is a thin dashed line straight across the chart, drawn when it is within twice the data’s top, and named under the chart either way. A hollow point was taken under noise. Where any run of a chart is an estimate from a model, the line through the runs is itself dashed, and the chart is marked as an estimate. The newest launch phases (
launch.phase.*) are one bar split into phases, up to six with the smallest folded into “other”, and each journey’s newest run one bar split by step, with a table of each step’s time, verdict, frames and memory; a journey’s whole has a trend, and so has a step the gate calls slower. Every chart has a table under it. - An empty store shows the one command that fills it.
A trend reads a key’s newest 30 runs and says how many there are. Times are UTC.
How this was checked, and on which devices: the evidence.
Asking a kept trace
Section titled “Asking a kept trace”perf_query answers from a kept trace with no new recording: read-only SQL on a .pftrace through the pinned trace processor (optional
INCLUDE PERFETTO MODULE lines, then one SELECT or WITH), and on an Instruments .trace a table digested to its top rows (table; none
lists the tables). Rows are bounded, cells cut at 200 characters, and only files under the traces or measurements folders are read.
The simulator’s frame probe
Section titled “The simulator’s frame probe”On by default for perf_scroll and perf_trace on a simulator. probe: false keeps a call from putting it in, so nothing is relaunched: an app that runs under it already, as one this tool launched while the probe is held, is measured by it all the same, and the answer says so; one that runs without it is refused UNSUPPORTED, as a simulator has no other frame source. perf_launch takes it on request, so that a kept launch stays one kind whatever else measured the app. ios/SimHelper/SimProbe.m, compiled on first use with clang (no binary ships), injected through SIMCTL_CHILD_DYLD_INSERT_LIBRARIES. The app relaunches once, unless it runs under the probe already; the app is not rebuilt. Once in, the probe is held in every launch this tool makes of the app, beside a running capture’s network probe, until the session ends or device_setting restore, which leaves the network probe of a capture that still runs held; a launch made elsewhere (the home screen, a link that starts the app) has none, and a measure says so. The relaunch leaves it on its first screen, so perf_scroll and perf_trace then measure nothing and refuse with CHECK_FAILED: open the screen again and call once more. They do not bring the app back where it was, as the way there is the app’s own and no replay of it is sure: on the fixture a list opened by a link measured its first screen at 0.4 % and 3.1 % jank in two runs, where the list itself janks on every frame.
It runs a CADisplayLink on the main run loop and writes every frame interval, stalls over 100 ms, and when the app last finished handling a touch. Every result says what it is: main-thread pacing, not the render server or GPU, on the Mac’s speed. It finds stalls and regressions on one machine; it does not predict a phone’s frame rate, as Apple says of simulators that they do not replicate a device’s performance.
A start through it (perf_launch with trace) writes its phases: load, process start to the library’s first code; main, to UIKit’s application object, so static initializers and what runs before UIApplicationMain, a SwiftUI app’s init among them; uikit, to did finish launching; first_frame. A second start, held before its first instruction by simctl launch --wait-for-debugger, is profiled from there, and its busiest functions are in the answer.
What is measured and how
Section titled “What is measured and how”| measure | source | notes |
|---|---|---|
| frames | dumpsys gfxinfo <pkg> framestats, then reset in the same shell |
summary (total, janky %, p50-p99, frozen = frames ≥ 700 ms from the histogram) and the last ~120 frames of every window: a frame taking over two vsync intervals from its vsync to completion is slow (a smooth frame takes about one, the render pipeline). Some releases print FrameInterval and FrameStartTime swapped against their header: the interval is the column with a plausible period. A row timed to end after it was read is left out, and counted, as an emulator times some frames to end 2^56 ns on. |
| frame timeline | Perfetto android.surfaceflinger.frametimeline (Android 12+), analysed by the pinned trace processor |
every frame of the app’s process with its jank type: app deadline missed, buffer stuffing, compositor (SurfaceFlinger, display HAL, prediction error). The app’s own share (app deadline missed) is reported apart: an emulator marks nearly every frame with a prediction error of its emulated display (measured: 122 of 122 frames of a smooth animation), which is not the app’s. Perfetto v59.1 by its sha256: the app’s own or fetched on first need. |
| memory | dumpsys meminfo <pkg> |
TOTAL PSS (what the system charges the app), Java and native heap, graphics, private dirty; it says when most of it is swapped out to zram, which the heaps leave out |
| CPU | /proc/<pid>/stat utime + stime before and after a window, getconf CLK_TCK |
% of one core over the window (2 s by default, cpuWindowMs); each thread’s share beside it; perf_profile names functions with simpleperf |
| launch | am start -W |
cold: the app is stopped first; warm: it goes home and comes back. One warm-up launch is left out, then the median TotalTime of the launches the system reports in that state, and the answer says how many launches that is when the system timed others as another state. WaitTime includes am’s own cost and is not used. |
| device state | /proc/loadavg, /proc/pressure/cpu, /proc/meminfo, dumpsys thermalservice, dumpsys battery |
recorded with measurements: a loaded device explains slow frames that are not the app’s |
Against Play’s definitions
Section titled “Against Play’s definitions”A local run says “this session would count” or “would not”, in the answer and on the dashboard, with the number and the limit beside it, and never a rate: Play’s thresholds are shares of users or sessions over 28 days (vitals overview, Play Console help, technical quality requirements), and one phone in one run has neither.
| number | counts when | definition |
|---|---|---|
frames.slow_percent, from gfxinfo’s histogram |
over 50 % of a session’s frames take over 16 ms | slow frames |
frames.frozen_percent, from the same, from 1,000 frames |
over 0.1 % take 700 ms or longer. Under 1,000 frames it says too few, as one frame in 500 is already over it, and keeps no share | frozen frames |
launch.worst_cold_ms, worst_warm_ms, worst_hot_ms |
the day’s longest start of that state, from midnight Pacific as Play’s session is: 5 s, 2 s, 1.5 s. The gate stays on the median | slow start |
wakelocks.percent, of the window, from what is held |
all partial wake locks over 2 h in 24 h, which is 8.33 % of any window: said as “at this pace”, as a short run has no day to count. Not what the system holds for the app’s audio or location | excessive wake locks |
wakelocks.longest_ms |
one lock over 1 h, read from when it was acquired, before the window too | stuck wake locks |
wakeups.per_hour, from dumpsys alarm |
over 10 an hour, at this pace | excessive wakeups |
memory.anon_swap.<state>.<tier>gb_kb, also: anonMemory |
RssAnon + VmSwap of the main process against Play’s table for its state and the device’s RAM: 2.25 GB in the foreground on 8 GB, 1.5 GB in a service or in the background, none cached. Tiers below 4 GB or above 16 GB, and a game’s higher limits, are not read |
memory usage, limits |
memory.bitmap.<state>_kb, from dumpsys meminfo |
over 200 MB in a service or the background, over 400 MB cached, none in the foreground | bitmap memory |
surface.slow_50_percent, surface.slow_34_percent, also: surface |
over 25 % of frames not presented less than 50 or 34 ms after the last, a game’s session, and Play only looks after its first minute, which a read of the last 127 frames has nothing of | slow sessions |
exits.user_anrs, of exits.anrs |
an ANR of Input dispatching timed out, the only kind Play calls user-perceived, from the exits and the dropbox, as an app that recovers ends in no exit |
ANRs |
A hot start’s limit is 1.5 s by the developer page and 1 s by the help page; 1.5 s holds here, and the answer says the other. The help page is out of date on other points, such as wake locks, so it has the lesser claim. A bucket of the histogram holds a whole millisecond and those above it, so a frame of 16 to 17 ms is left out of “over 16 ms” and that share is the least it can be. At 90 or 120 Hz the same page speaks of a missed deadline too, and nothing settles which: 16 ms is Play’s written number, and frames.jank_percent keeps the deadline’s share beside it. An app with no View toolkit (Vulkan, a game engine) has no such frames, as Play says of it too.
What a run keeps of how an app ended. exits.crashes, exits.anrs and exits.user_anrs are what happened during the run, and never what the system still holds. A snapshot is a moment, so they count what is newer than the last run of the same app, scenario and kind of device, by the system’s own stamps: each exit’s and each dropbox entry’s time on Android, read against the device’s own clock as they are in its local time, and the time in each report on iOS. A first run has nothing to count from and keeps none. What the system holds, 16 exits, a dropbox with no age limit and up to 100 reports, is said beside it as the system holds N, and feeds no gate and no Play line. A run’s time is stamped after its reads, so what falls between the two belongs to neither.
How an app ended. crashes reports what is a death, with its stack, and counts every exit the system keeps by its reason in full, so that an end nobody calls a crash is seen: every exit kept: USER REQUESTED FORCE STOP 2, SIGNALED status 9 1, ....
A surface’s frames. What a game or an engine draws goes to a SurfaceView, past the View toolkit, so gfxinfo has no frames of it: it read 6 for a surface that drew 78. perf_snapshot with also: surface reads the app’s SurfaceView from dumpsys SurfaceFlinger --latency, which keeps a surface’s last 127 frames whatever their age, so it says how long ago the last one was. A present lands on the display’s refresh, so a gap is read in whole refreshes: a share taken from the raw numbers read 23 %, either side of the limit by chance, as a gap of three refreshes is 49.9 or 50.1 ms. Play counts a frame not presented less than 50 ms after the last, so a gap of exactly that is slow. So at 60 Hz, where nothing lands between 33.3 and 50 ms, the two bars are one, and a surface at 25 frames a second is a slow session at 20 FPS, as two gaps in five are 50 ms.
A scroll of an app that draws on its own surface, as a Flutter app does, perf_scroll reads from that surface where gfxinfo counts too few: it reads the surface every 500 ms over each round, as it keeps only its last 127 frames, and keeps surface.p95_ms and the two shares of each round, as perf_snapshot does. A frame is known by the time it was to be shown, as SurfaceFlinger corrects the time its newest was shown after a first read, and no gap is taken across a stretch a late read missed. Each round says it is on the app’s own surface.
Memory by process state. perf_snapshot with also: anonMemory reads the state the process is in and keeps the number under it, so a flow that goes home, or a foreground service, fills the other states. Play judges the P90 of its fleet from February 2027: a reading is one device’s, and the answer says so.
Battery signals. perf_snapshot with also: battery, over batteryWindowMs (30 s by default). Batterystats counts wake locks on battery only, and a phone on a cable never is; telling it otherwise with dumpsys battery unplug is what can reset its history. So a lock is read as it is held, once a second, and its age is what ACQ says; one held for under a second may not be seen, and the answer says so. Alarms and jobs are counts that go on whatever the power source. A force-stop clears an app’s alarm counts: a window with one in it reads from zero. What the system holds for the app’s audio or location is listed and marked exempt, from the parser’s tests: no device run has held one.
How this was checked, and on which devices: the evidence.
Thresholds the tools name
Section titled “Thresholds the tools name”| issue | threshold | source |
|---|---|---|
| jank | median janky share of the scroll rounds (rounds under 60 frames left out) above 10 % | this project’s default |
| memory growth | over 30 % from the second round’s end to the last’s (the first round loads images and caches) | this project’s default |
perf_scroll reads one round, and three where it keeps the run under a scenario, for the median a baseline or a
compare takes; repeats asks for others. x and y or a selector name the list, as swipe takes them, and the swipes go through its middle. Over the jank threshold it scrolls once more under the CPU profiler, which no
round counts, and names the app’s top function in that scroll, the first that is not a kernel address, as an emulator hides the kernel’s names: on an API 34 emulator, the fixture’s heavy list read 94.4 % janky in one round and named dev.appdyno.fixture.HeavyListActivity.heavyFrame, 84 % of the samples, in 25 s.
An emulator’s numbers depend on the host’s load and GPU mode: they are relative and only compared with the same kind of device (the tools say “virtual device: relative, compare only with the same kind of device”).
A simulator app is a Mac process: its measures come from the Mac’s own tools. A phone’s come from Xcode’s trace
tool (xctrace), which says when a recording has started (--notify-tracing-started, so a scroll runs inside it,
not after a guessed sleep) and is stopped at most 120 s past its limit. A start took 14-19 s and a stop 4-14 s on
a phone connected by USB, whatever the recording’s length. One that has not said so in 90 s hung before it recorded:
it is stopped then, and the answer says the trace tool did not start.
perf_profile on a simulator records with the same tool. An app with no samples in the window, an idle one, is sampled once more by sample, for as long again.
| measure | simulator | iPhone | notes |
|---|---|---|---|
| memory | footprint <pid> (physical footprint) |
Activity Monitor, every process, memory-physical-footprint |
the phone’s footprint at the end of the recording; no attach, so a system app can be read |
| CPU | ps -o time= before and after a window |
Activity Monitor, every process, the mean of its cpu-percent |
% of one core |
| launch | simctl launch until the first screen reads |
devicectl until the runner reads the first screen |
cold: terminated first; warm: another app in between. One warm-up left out, the median of the rest; includes a read. xctrace’s App Launch needs get-task-allow: denied for Settings |
| CPU profile | Time Profiler, attached (sample sees no busy samples of a simulator app under macOS 27, and stays only for a Mac where attaching fails) |
Time Profiler, every process, as attaching fails at times on a phone | the busiest functions by the weight of the samples on top of their stacks, and the app’s own functions (of a binary inside an .app) by inclusive weight; the trace stays for Instruments |
| heap | leaks --outputGraph (a memory graph for Xcode), the leaks found |
– | the summary is read from the saved graph |
| hangs | – | Time Profiler’s potential-hangs |
perf_trace with what: hangs: there is no Hangs template in Xcode 27.1, so the Time Profiler’s table is read |
| hitches | – | xctrace record --template 'Animation Hitches', exported |
frames shown, the app’s hitches, their total and worst time, the hitch ratio and the likely causes; a frozen frame is a hitch or a hang of 700 ms or longer. A recording with no displayed surfaces is refused (CHECK_FAILED: nothing moved), never “no hitches”. The few surfaces seen earlier came from our own bug: the start note was never noticed, so the scroll ran 30 s late, outside the recording. On a simulator the tool’s recording fails. |
| network | nettop on the app’s process |
Power Profiler instrument, attached, wifi- and cellular- columns |
an app’s bytes, headers included, in periods of 5 s on a phone; the measure records 6 s past its window, as the unfinished last period is left out |
| energy | ri_energy_nj of the app’s process (proc_pid_rusage): this Mac’s energy |
Power Profiler instrument, attached: energy.impact |
a phone has a score, by subsystem, no joules |
| leaks | leaks, in a memory graph |
Leaks template, attached, 15 s | a phone: an app signed for development; on both, each object of a cycle is a leak of its own |
A simulator’s numbers are relative: Device.virtual is true there, false on a phone, and the tools say so.
How this was checked, and on which devices: the evidence.
Run it yourself: node scripts/speed.mjs <device id> [runs] times the calls an MCP client makes most, on the fixture app (dev.appdyno.fixture, from android/fixture or ios/), on any device. pnpm build first. Each run starts a new server over stdio, as a client does, sends initialize and tools/list, then the calls below. Every call is proved by its answer: a tap has to reach the next screen, a typed field has to hold the text, and a refusal or a missing proof stops the run. The fixture is stopped before each launch_app, so each launch is cold. A run before the measured ones starts what the device needs, the iOS runner’s build and start or the Android agent’s, and only its first read is kept. At the end the script stops the iOS runner it started and waits for it to end, as xcodebuild writes the session’s results into the script’s state folder as it ends, and then removes that folder.
Medians and the worst of 5 runs, in ms, each through the MCP server over stdio, on 2026-11-10 (the iPhone and the Samsung on 2026-11-09, the Xiaomi on 2026-11-07), on an M5 Pro with 15 cores and macOS 27.0.1, with the commit and the host’s load beside each device. A tap or a swipe is timed two ways. The touch alone, with read: none, answers once the touch has gone, with no settle and no read, and proves nothing by itself: the script proves it by a wait after it, not timed. With the settled screen, the default, the call also waits until the screen has been still for 200 ms and answers with what changed, which is its proof. A tap elsewhere is often the touch alone, so compare it with that row:
| call | iOS simulator | Android emulator | iPhone | Samsung | Xiaomi |
|---|---|---|---|---|---|
initialize |
141 / 153 | 142 / 148 | 134 / 137 | 120 / 131 | 104 / 115 |
tools/list |
7 / 7 | 8 / 9 | 6 / 7 | 6 / 6 | 6 / 7 |
list_devices |
112 / 123 | 119 / 175 | 220 / 258 | 118 / 148 | 476 / 568 |
screen, first of a server |
375 / 434 | 30 / 32 | 591 / 624 | 147 / 181 | 136 / 159 |
launch_app of the fixture, cold |
2,044 / 2,139 | 823 / 834 | 2,636 / 2,654 | 1,548 / 1,615 | 1,890 / 2,063 |
screen |
18 / 27 | 11 / 14 | 308 / 317 | 49 / 59 | 58 / 68 |
swipe, the touch alone (read: none) |
313 / 315 | 647 / 710 | 913 / 1,044 | 380 / 432 | 679 / 717 |
swipe, with the settled screen |
2,768 / 2,965 | 1,336 / 1,402 | 3,965 / 4,233 | 2,344 / 2,350 | 2,512 / 2,560 |
find |
14 / 108 | 11 / 12 | 139 / 140 | 123 / 151 | 42 / 44 |
tap by coordinate, the touch alone (read: none) |
168 / 311 | 260 / 294 | 310 / 314 | 80 / 108 | 142 / 144 |
tap by coordinate, with the settled screen |
890 / 993 | 469 / 599 | 970 / 1,101 | 711 / 1,517 | 810 / 858 |
| back | 384 / 813 | 486 / 562 | 1,123 / 1,133 | 768 / 803 | 624 / 805 |
tap by selector, with the settled screen |
1,084 / 1,149 | 696 / 759 | 918 / 925 | 989 / 1,075 | 825 / 879 |
type_text into a field by selector |
1,137 / 1,333 | 648 / 690 | 1,934 / 2,076 | 930 / 949 | 1,199 / 1,351 |
wait_for an element on the screen |
49 / 52 | 23 / 26 | 163 / 281 | 160 / 162 | 130 / 144 |
screenshot |
82 / 113 | 28 / 81 | 184 / 223 | 166 / 284 | 111 / 119 |
logs, 20 lines |
1,128 / 1,205 | 45 / 47 | 1 / 2 | 717 / 747 | 233 / 246 |
- iOS simulator: an iPhone 17 Pro with iOS 27.2, at
15497894, host load 5.3-6.4, the median of two runs’ medians and the worst of both. - Android emulator: a Pixel 6 AVD with API 34 (
google_apis, arm64),-gpu host, at15497894, host load 4.9-5.9, the median of two runs’ medians and the worst of both. On other boots of the same AVD a read took 8-55 ms on 2026-11-09: a boot moves it more than a commit does. - iPhone: an iPhone 13 Pro Max with iOS 27.2, by USB, at
97aa4b06, host load 3.9-4.9. Itslogssays at once thatdevicectlcannot read an app’s log. Its coldlaunch_apptook 1,558-2,636 ms between runs of the same hour, and the build the table had before took 2,199 between them: the phone’s, not the code’s. - Samsung: an SM-A525F with Android 14, by USB, at
97aa4b06, host load 4.8-5.1. Itslogstook 717-764 ms on this commit and on the build the table had before alike, where it took 446 then: what the phone’s log holds, not the code. - Xiaomi: a 25078RA3EY with Android 16 in Turkish, by USB, at
b9c2bbf0, host load 5.4-6.2.
With the settled screen, a call’s time is mostly the app’s own: the script’s settle column says how much. back is the key on Android and the screen’s own control on iOS. find and wait_for come after a screen changed, so each reads it afresh. A number is relative to this Mac at this load.
Where each call’s time goes, and what was tried and dropped: Where the time goes. The tables measured before this one: Earlier measurements.
Mirror
Section titled “Mirror”A window’s own cost, its frame rate and latency on each device, and Wi-Fi against a cable: Mirror.
This site counts visits with Cloudflare Web Analytics, without cookies.