Response measurement

in Japanese(日本語)

Run your existing scenarios on a physical device and measure, step by step, how long the app takes to react to an action and how long until the next action becomes possible. The values are kept in the results and can be compared with the previous measurement on the same machine and the same device.

Works with one Android or iOS physical device (not the Simulator or the Emulator).

What is measured

For every step that moves the screen (tap, swipe, scroll, …) the run records the values below. Verification steps (exist, …) and select steps are not measured.

Value Meaning
Time to first frame (firstFrameMs) From injecting the input to the first frame the app presents
Time until ready (readyMs) From injecting the input until the element the scenario operates next can be found, is enabled, is not covered by another element and has stopped moving

All times are taken on the device's clock, so the communication time between the Mac and the device is not included.

Before the action the run waits up to 10 seconds for drawing to stop, then taps Log in by injecting input. From the injection to the app's first frame is the time to first frame; from the injection until the My page button operated next is found, enabled, not covered and not moving is the time until ready. All times are taken on the device's clock

Time until ready is decided by the element the scenario actually operates next. If a scenario taps "Log in" and then taps "My page", the value for "Log in" is "from the tap until the My page button can be pressed".

A four-step scenario: tap Log in, exist Welcome, tap My page, tap Settings. Each tap step measures the time to first frame; exist is a verification step and is not measured. The time until ready of Log in lasts until My page, operated next, can be pressed; that of My page until Settings can be pressed. The last action, Settings, has no time until ready

Turning it on

Write responseMeasurement: true in the run profile (profiles/runs/<name>.json).

{
  "app": "my_app",
  "devices": [
    { "platform": "android", "name": "Pixel 8", "kind": "physical", "serial": "XXXXXXXX" }
  ],
  "responseMeasurement": true,
  "responseRepeat": 5
}

To try it once without editing the profile, override it with --set.

fleetest run --profile <name> --set responseMeasurement=true --set responseRepeat=3 --scenario <scenarioID>

Before every action, measurement mode waits for the app to stop drawing (up to 10 seconds), so a run takes longer than usual.

Reading the results

fleetest results response [--project <name>] [--since <period>] [--json]

This collects only measurement-mode runs and lists them per step.

Column Meaning
scenario / step The scenario and a step within it (identified by scene, section, command, description and occurrence of the same combination)
device / host The device (serial) and the machine that ran it
n / median ms / p90 ms Sample count, median and p90 of the time to first frame
busy How many times the app was still drawing before the action, so the first frame was not measured (see "When a value is missing")
ready n / ready median ms / ready p90 ms Sample count, median and p90 of the time until ready
prev median ms / delta The median time to first frame of the previous measurement run on the same machine and device, and the change from it

Each individual value is also kept in the result JSON (results/runs/.../scenarios/<id>.json) under each step's response.

The scenario report (reports/scenario-*.md) shows the values after the duration of each measured step: · first frame 54 ms · ready 72 ms. When a value is missing it shows the reason instead (first frame - (busyBeforeAction)); when the ready time was not judged, the ready part is left out. The ready value of a step arrives with the next measured step, so the last measured step of a scenario has none.

When a value is missing

When a step has no value, the reason is kept as a fact. When the reason cannot be stated, the field is left out.

Time to first frame (firstFrameMissing)

Reason Meaning
busyBeforeAction The app was already drawing before the action (it did not stop within 10 seconds). Its "first frame" would only continue the earlier drawing, so it is not measured
noInjectedInput The step did not inject an input event (it was performed through an accessibility action, or by adb on the Mac side, …)
noFrame The app presented no frame after the input before the next action (for the last action, within the 10-second observation limit)
frameHistoryIncomplete The frame history was too short to confirm the frames right after the input
noSessionApp The target app could not be confirmed
bridgeError Communication with the device side failed

Time until ready (readyMissing)

Reason Meaning
notReadyBeforeNextAction The conditions were not met by the time the next action was performed
observationTimeout The conditions were not met within the observation limit (10 seconds)
observationTruncated The recording limit was reached and the rest could not be recorded
observationLost The observation could not be found on the device side
noTarget The next action had no element (for example a coordinate tap)
bridgeError Communication with the device side failed

In the following cases there is neither a time until ready nor a reason (the step was not judged):

Things to know

Measuring on an iOS physical device

Related: Measuring app responsiveness (procedure) / Run profile / Analyzing results (fleetest results, dashboard) / Running scenarios