Measure KPIs for Fire TV apps on Fire OS
Performance testing is the process of app testing in areas such as compatibility, reliability, speed, response time, stability, and resource usage on Amazon Fire TV devices running Fire OS. You can use this testing to identify and address your app's performance bottlenecks. Performance testing involves gathering and evaluating key performance indicator (KPI) metrics. To gather KPI metrics, you run a specific set of steps on an Amazon device and then find or calculate the metrics using device resources, such as logs.
Make sure to run performance tests before submitting your app to Amazon Appstore. By regularly tracking these KPIs, you can verify that your app delivers a smooth, responsive experience.
Understanding latency and memory:
- Latency measures how quickly your app launches and becomes usable. Users expect near-instant app startup and minimal delay before interacting with content.
- Memory measures how efficiently your app uses device RAM. Excessive memory consumption leads to system kills, poor multitasking performance, and degraded user experience.
Prerequisites
Before you measure app KPIs on Fire OS:
- Install the following software packages on your development computer:
- Amazon Corretto
- Android Studio (make sure to install platform tools during setup)
- Appium
- Complete the following setup:
- Set up a path for JAVA_HOME and ANDROID_HOME folders.
- Enable developer mode on the device and enable USB Debugging. For instructions, see Enable Debugging on Amazon Fire TV.
- Capture the serial number of the attached device using:
adb devices -l
- Read the following sections:
App KPI metrics and guidelines
The following table lists KPI metrics to measure for Fire TV apps on Fire OS, and the recommended guideline for each. These metrics measure launch performance and memory efficiency.
| KPI | Unit | Scenario | Description | Guideline |
|---|---|---|---|---|
| Time to first frame (TTFF) | Seconds (s) | Cold start app launch | Measures time from app launch to first frame render. Calculated from Atrace: AMS.startActivityAsUser to eglSwapBuffersWithDamageKHR. |
< 2.0 s |
| TTFF | Seconds (s) | Warm start app launch | Measures time an app takes to display its first frame when moving from background to foreground. | < 1.0 s |
| Time to full display (TTFD) | Seconds (s) | Cold start app launch | Measures time from launch until app is ready for user interaction. Requires reportFullyDrawn(). |
< 10.0 s |
| TTFD | Seconds (s) | Warm start app launch | Measures time for app to become fully interactive after moving from background to foreground. | < 2.0 s |
| Foreground memory | MB | App in foreground (4K video) | Measures app proportional set size (PSS) total when active and playing 4K video content. | < 400 MB |
| Foreground memory | MB | App in foreground (1080P or lower) | Measures app PSS total when active with 1080P or lower resolution content. | < 300 MB |
| Background memory | MB | App in background | Measures app PSS total after playing content for 10 min and moving to background. | < 100 MB |
| eMMC write (FG) | MB/hr | App in foreground | Average rate of data written to eMMC storage while app is active. | < 50 MB/hr |
| eMMC write (BG) | MB/hr | App in background | Average rate of data written to eMMC storage while app is in background. | < 2 MB/hr |
Launch scenarios
Performance testing measures two types of app launch scenarios to evaluate TTFF and TTFD:
- Cold start – When a user launches an app after they force stop the app process or reboot the device. The system must load all resources and dependencies into memory.
- Warm start – When a user moves an app from background (inactive state) to foreground (active state) with some resources and dependencies already in memory.
Fully drawn marker
A fully drawn marker signals when your app becomes interactive for users. The marker:
- Indicates when your app completes loading its essential components.
- Marks when users can start interacting with your app.
- Helps measure TTFD performance.
To implement, call reportFullyDrawn() from your Activity at these key points:
- Cold start – After loading initial data and rendering the main screen (sign-in page or home page).
- Warm start – When your app becomes responsive after foregrounding.
The following example code shows how to add a fully drawn marker.
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().getDecorView().post(() -> {
reportFullyDrawn();
});
}
}
class MainActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
window.decorView.post { reportFullyDrawn() }
}
}
reportFullyDrawn() after the sign-in or home page is fully rendered.Measure KPIs with ADB and Atrace
Use Android Debug Bridge (ADB) and Atrace to measure each KPI on a Fire TV device running Fire OS.
Test strategy
During testing, you launch the app and force stop it several times using the app launcher intent or the Monkey tool. Between each iteration, capture Atrace logs, perform navigation actions, capture timer values, and capture memory usage before force stopping.
Amazon recommends running the following minimum number of iterations.
| Performance test category | Minimum iterations |
|---|---|
| Latency – time to first frame (TTFF) | 50 |
| Ready-to-use – time to full display (TTFD) | 10 |
| Memory | 5 |
Devices to test
For test coverage across Fire OS versions, test on the following reference devices.
| Fire OS version | Reference device |
|---|---|
| Fire OS 6 | Fire TV Stick 4K (2018) |
| Fire OS 7 | Fire TV Stick with voice remote (2020) |
Cold start KPIs
Cold start KPIs measure app performance when launching the app after force stopping the app process or rebooting the device.
TTFF - cold start
- Force stop the app:
adb -s <DSN> shell am force-stop <package_name> - Start Atrace:
adb shell atrace -o /sdcard/atrace.capture -t 15 -b 32000 -a <package_name> gfx input am view wm - Launch the app:
adb -s <DSN> shell monkey --pct-syskeys 0 -p <package_name> -c android.intent.category.LEANBACK_LAUNCHER 1 - Wait 30 seconds.
- Pull the Atrace logs:
adb -s <DSN> pull /sdcard/atrace.capture ./atrace_cold_<iteration>.txt - Calculate time difference:
- Start marker:
AMS.startActivityAsUser - End marker:
eglSwapBuffersWithDamageKHR
- Start marker:
- Force stop the app.
- Repeat steps 1–7 for 50 iterations.
TTFD - cold start
Follow the same steps as TTFF - cold start, but use these markers:
- Start marker:
AMS.startActivityAsUser - End marker:
Activity.reportFullyDrawn(matching app PID)
Repeat for 10 iterations.
Warm start KPIs
Warm start KPIs measure app performance when bringing the app from background to foreground, with some resources already in memory.
TTFF - warm start
- Launch the app and press Home to send it to background.
- Start Atrace.
- Launch the app (bringing it to foreground) using the Monkey tool.
- Wait 30 seconds.
- Pull the Atrace logs.
- Calculate time difference:
- Start marker:
AMS.startActivityAsUser - End marker:
eglSwapBuffersWithDamageKHR
- Start marker:
- Press Home button to send the app to background.
- Repeat steps 2–7 for 50 iterations.
TTFD - warm start
Follow the same steps as TTFF - warm start, but use Activity.reportFullyDrawn as the end marker.
Repeat for 10 iterations.
Foreground memory KPIs
Foreground memory KPIs capture your app's memory consumption while it's actively running and playing content.
- Download, install, and sign in to the app (if applicable).
- Force stop the app.
- Launch the app using the Monkey tool.
- Play video content for 10 minutes.
- Wait 120 seconds.
- Capture foreground memory:
adb -s <DSN> shell dumpsys meminfo <package_name> - Force stop the app.
- Repeat steps 2–7 for 5 iterations.
The PSS Total from dumpsys meminfo is the primary metric.
Background memory KPIs
Background memory KPIs capture your app's memory consumption after it has been moved to the background. When RAM is low, the system is more likely to kill apps with high background memory usage.
- Download, install, and sign in to the app (if applicable).
- Launch the app and play video content for 10 minutes.
- Press Home button to send the app to background.
- Wait 60 seconds.
- Capture background memory:
adb -s <DSN> shell cat /proc/<PID>/statm - Repeat steps 2–5 for 5 iterations.
Summary of guidelines
The following table summarizes the recommended guidelines and measurement iterations for each KPI.
| KPI | Guideline | Measurement |
|---|---|---|
| TTFF cold start | < 2.0 s | 50 iterations |
| TTFF warm start | < 1.0 s | 50 iterations |
| TTFD cold start | < 10.0 s | 10 iterations |
| TTFD warm start | < 2.0 s | 10 iterations |
| Foreground memory (4K) | < 400 MB | 5 iterations |
| Foreground memory (1080P) | < 300 MB | 5 iterations |
| Background memory | < 100 MB | 5 iterations |
| eMMC write (foreground) | < 50 MB/hr | Continuous |
| eMMC write (background) | < 2 MB/hr | Continuous |
KPI health assessment
Use the following indicators to evaluate whether your app's KPI results meet the recommended guidelines.
| Indicator | Meaning |
|---|---|
| Pass | Meets the recommended guideline |
| Warning | Within 10% of the guideline |
| Fail | Exceeds the guideline by more than 10% |
Tools
The following tools can help you measure and monitor app KPIs on Fire TV devices:
- Android Debug Bridge (ADB) – Command-line tool for communicating with Fire TV devices.
- Atrace/Systrace – System tracing utility for capturing performance markers.
- Monkey tool – App launcher for automated testing.
- Appium – Test automation framework.
- Maestro – Script-based UI automation for memory/playback scenarios.
- Android Studio Profiler – Real-time CPU, memory, and network profiling.
- App Health Insights Dashboard – Developer Console dashboard for tracking live app metrics.
Related topics
- App Performance Scripts for Fire TV
- To learn more about ADB commands, see Android Debug Bridge (adb) in the Android developer documentation.
- For more tests on Fire TV devices, see Test criteria group 2a: App behavior on Fire TV device.
Last updated: Jul 23, 2026

