EmuLabZip logo EmuLabZip

Performance

Last updated · Edit this page on GitHub

The Performance tool samples the selected app and the device while the tool is open, and draws the last two minutes as live charts. Pick the app in the toolbar; without one, only device-wide values are shown.

What is measured#

ValueAndroidiOS Simulator
App CPU/proc/<pid>/stat user + system time, as a share of all coresHost process CPU time (ps), as a share of all of the Mac's cores
Device CPU/proc/stat, busy time across all cores— (the simulator shares the Mac's CPU)
App memoryResident set size (VmRSS)Resident set size of the host process
Device memoryMemTotal − MemAvailable from /proc/meminfo—
Frame rateFrames rendered per second, from dumpsys gfxinfoPhase 4, with Instruments traces
Janky framesShare of janky frames since the previous samplePhase 4
BatteryLevel and temperature from dumpsys battery—

Each Android sample is one adb shell call that runs every command at once, so sampling every 500 ms stays cheap. The app's process id is looked up on every sample: when the app restarts, the charts continue with the new process.

Reading the charts#

  • CPU percentages are of the whole device, the way Android Studio shows them. On a 4-core emulator, one busy core is 25%.
  • The frame rate only moves while the app draws. A static screen renders no frames, which is good.
  • Janky frames are frames that missed their deadline, as counted by the platform's gfxinfo.
  • Hover a chart to read exact values. Charts with a single series have no legend; the title names the value.

Controls#

ControlEffect
0.5 s · 1 s · 2 sTime between samples.
PauseStops sampling; the charts keep what they have.
Clear (trash)Empties the charts.

Sampling stops when you leave the tool, so it never runs in the background.

Below the charts are two cards that measure something on request: Start time (guide) and Energy (guide). Both change the device while they run (the app is stopped and opened; the battery is unplugged in the battery service's eyes), and put it back.

From the command line#

emulabzip perf --app com.example.app
emulabzip perf --app com.example.app --interval 500 --json | jq .appCpu