Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
The Vega App KPI Visualizer helps you monitor and optimize your app’s performance by measuring key metrics that impact your user experience. This tool provides data about app launch times, memory usage, and user interface (UI) responsiveness. By regularly tracking these KPIs, you make sure that your app delivers a smooth, responsive experience that meets your users’ expectations. Before you publish your app to the App Store, make sure to measure the performance of the release variant to verify that your users have a responsive experience. This page explains how to:
  • Use the KPI Visualizer
  • Measure and understand your app’s key performance metrics
  • Set up measurements
  • Interpret results

Prerequisites

Before you use the Vega App KPI Visualizer, make sure you:
  1. Install the Vega Performance API module:
  2. Read the following sections:
  3. To measure foreground memory, video fluidity, or UI fluidity, follow the instructions in Measure Fluidity and Foreground Memory.
  4. Choose your measurement method:

App KPI metrics and guidelines

The following table presents both main KPIs and their associated Micro KPIs. Main KPIs measure overall performance metrics, while Micro KPIs represent specific measurable components that contribute to a main KPI. For example, Application JavaScript bundle load time is a Micro KPI that contributes to the overall time-to-fully-draw (TTFD) KPI. Empty Micro KPI cells indicate that no specific sub-components are currently being measured for that main KPI.

Launch scenarios

The KPI Visualizer measures two types of app launch scenarios to evaluate performance for TTFF and TTFD:
  • Cool start - When a user launches an app for the first time, and the system loads all resources and dependencies into memory.
  • Warm start - When a user moves an app from background (an inactive state) to foreground (an 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 fully drawn marker in your app:
  1. Add the useReportFullyDrawn hook to your app.
  2. Place markers at these key points:
    • Cool start - After loading initial data and rendering the main screen.
    • Warm start - When your app becomes responsive after foregrounding.
The following code sample shows how to add fully drawn marker:

Measure KPIs in VS Code

Step 1: Open the command palette in VS Code

  • For Mac: Shift+Command ⌘+P
  • For Linux: Ctrl+Shift+P
Screenshot that shows the Vega: Launch App KPI Visualizer selected from the Command Palette.

Step 2: Add Vega: Launch App KPI Visualizer and press Enter

Screenshot that shows the location of the App KPI Visualizer option in the menu of App Performance Tools. You can also select the App KPI Visualizer from the Vega Studio panel.

Step 3: Select a use case

Screenshot that shows a list of use cases with checkboxes, snd the app asks you to choose one. To measure foreground memory and video streaming fluidity, create a custom test scenario that match how your users interacts with your app. For example:
  • For memory testing - Include video playback or image loading.
  • For streaming - Include typical video watching patterns.
For UI fluidity measurement, develop a test scenario that replicates the most common user interactions in your app. Without a custom scenario, the default test scrolls vertically and horizontally through your app’s front page, which might not accurately represent your users’ behavior. For guidance on generating test scenarios, see Measure Fluidity and Foreground Memory. After you select your use cases, the visualizer starts and performs three iterations for the following KPIs.

Cool start KPIs

  • Launch the test app on the device.
  • Wait for 10 seconds for the test app to completely load.
  • Close the test app.
  • Process the KPIs.

Warm start KPIs

  • Launch the test app on the device.
  • Launch another app on the device, moving the test app to the background.
  • Launch the test app, moving it to foreground.
  • Wait for 15 s for the test app to completely load.
  • Close the test app.
  • Process the KPIs.

Foreground memory KPIs

  • Launch the test app on the device.
  • Perform the specified steps in test scenario, and capture the KPIs for analysis and reporting.
  • Close the test app.
  • Process the KPIs.

Background memory KPIs

  • Launch the test app on the device.
  • Launch another app on device, moving the test app to the background.
  • Wait for 15 s to collect the KPIs of the test app.
  • Close the test app.
  • Process the KPIs.

UI fluidity KPIs

  • Launch the test app on the device.
  • Choose your test method:
    • Custom test - Use your own UI interaction scenarios
    • Default test - Uses standard scrolling patterns
      • 2 sets of horizontal scrolls (5 left, 5 right)
      • 2 sets of vertical scrolls (5 down, 5 up)
      • 900 ms between actions
  • Select the Cancel button or Esc key to end the test. Screenshot of the popup that asks if you want to use the custom test scenario. You can select the Yes button.
  • Capture the KPIs for analysis and reporting.
  • Close the test app.
  • Process the KPIs.

Video playback fluidity KPIs

  • Launch the test app on the device.
  • Perform the steps in video playback test scenario, and capture the KPIs for analysis and reporting.
  • Close the test app.
  • Process the KPIs.
To stop the visualization process, select Cancel. Screenshot of a message that confirms that the KPI Visualizer is running.

Step 4: Choose whether to ignore trace loss during the test

Screenshot that shows a message asking if you want to ignore trace loss and continue to generate a KPI report file. You can select to ignore the trace loss. When your app has performance issues, significant trace loss can occur. The Vega App KPI Visualizer won’t load traces and shows no KPIs (appear as N/A) in the report. You can choose to ignore trace losses when generating KPI reports to view the metrics. However, ignoring trace losses produces KPI values that appear better than actual performance.

Step 5: View KPI scores in the visualizer window

The window shows the P90 (90th percentile) value calculated from three test iterations.

Step 6: Assess results

To assess the results, see Understand the performance report.

Measure KPIs with CLI commands

  1. At the command prompt, run the vega exec perf doctor command to check if your host and target devices are ready.
    Replace --app-name with the package ID from the manifest.toml file. If multiple devices are running (including Vega Virtual Device), specify the device serial number in the perf commands using the --device-serial-number parameter. Example if only single device is connected:
    Example if multiple devices are connected:
  2. Start the Vega App KPI Visualizer:
    For kpi-visualizer, app-name is the only required parameter. Replace [app-name] with the id of default interactive component from the manifest.toml file.
  3. (Optional) Specify the default number of iterations. Default iterations: 3 or 30 if –certification is used.
  4. (Optional) Specify which KPI to measure:
    Without this parameter, the visualizer measures cool start TTFF and TTFD KPIs by default.
  5. View all available options:
    Example:
After the visualization completes, you see a report summary in stdout. Example report:
When KPIs show -1, it indicates unavailable data for mean, min, and max values. For TTFD, this might occur when the app doesn’t call Report Fully Drawn API. When KPIs don’t appear, there might be a significant trace loss during data collection. KPI Visualizer won’t load traces and shows no KPIs. To view KPIs despite trace loss, run:

Understand the performance report

The Vega App KPI Visualizer shows a performance report, which includes:
  1. Test information
    • Date - The date when the system captures the KPI data.
    • Device Serial ID - The unique identifier of the device running the app.
    • App - The name of the app for which the KPI data appears.
    • Number of iterations - The number of times the KPI measurement process runs.
  2. KPI Name - The name of the KPI with its unit.
  3. Test Name - The name of the test or the completed use case.
  4. KPI Health - A color-coded system representing the health of each KPI:
    • 🟢 (Green) - Meets the recommended guideline.
    • 🟡 (Yellow)- Within 10% of the guideline.
    • 🔴 (Red) - Exceeds the guideline by more than 10%.
  5. KPI Score - The numeric value of the KPI, which appears in the same unit as specified in the KPI name. If the visualizer can’t calculate the KPIs, it displays “N/A” for the KPI score and list the KPI Health as “Unknown.”
  6. Guideline - The recommended value or range for the KPI score based on industry standards or performance targets.

Example results

The following images show sample results for each use case. Pay attention to the KPI Health indicators and scores relative to guidelines.

Use case: Cool start TTFF and TTFD

The following result shows launch performance metrics. Red indicators show the app exceeds the launch time guidelines. A screenshot that shows the performance report for cool start TTFF and TTFD.

Use case: Warm start TTFF and TTFD

The following results shows how your app resumes from background state. Compare TTFF and TTFD times to evaluate optimization needs. A screenshot that shows the performance report for warm start TTFF and TTFD.

Use case: Foreground memory

Shows your app’s memory usage during active use. Monitor this metric to prevent performance issues from excessive memory consumption. Screenshot that shows the performance report for foreground memory

Use case: Background memory

Shows your app’s memory footprint while in background state. Important for understanding your app’s impact on system resources when inactive. A screenshot that shows the performance report for background memory.

Use case: UI fluidity

Shows how smoothly your app handles user interactions. The percentage indicates frames successfully rendered during scrolling and navigation. A screenshot that shows the performance report for UI fluidity.

Use case: Video playback fluidity

Shows how smoothly your app plays video content. The percentage represents successful frame delivery at the intended playback rate. This scenario also includes media player and input event micro KPIs. A screenshot that shows the performance report for video playback fluidity.

Open a KPI report

After the Vega App KPI Visualizer completes the test scenarios, it generates the following report files:
  • aggregated-kpi-report-[timestamp].json - Consolidates KPI data from all test scenarios.
  • [test-name]-kpi-report-[timestamp].json - Creates one file for each individual test scenario. The [test-name] identifies the specific scenario.
The [timestamp] tells you when the Vega App KPI Visualizer generated the report. To open a KPI report, open a previous recording. Then use one of these methods:

Option 1 (Preferred): Use Quick Open

This method provides access to your recordings through VS Code’s interface or CLI.

From VS Code

  1. Find the KPI report file (example: app-launch-kpi-report-[timestamp].json) using VS Code Quick Open or in the project’s generated directory.
  2. Select the file once to preview or twice to open in active mode.

From the CLI

  1. Open a terminal window and enter:
    If your terminal doesn’t recognize the code command, open the VS Code Command Palette:
    • Mac: Cmd+Shift+P
    • Linux: Ctrl+Shift+P
  2. Run “Shell Command: Install code command in PATH”.
  3. Retry the command.

Option 2: Use the VS Code Command Palette

This method provides access to your recording using VS Code’s built-in command interface or if Quick Open isn’t available.
  1. Open VS Code.
  2. Open the command palette:
    • Mac: Cmd+Shift+P
    • Linux: Ctrl+Shift+P
  3. Enter Vega: Open Recording View.
  4. Select the file you want to open, such as app-launch-kpi-report-[timestamp].json.

Last modified on November 11, 2025