Understanding Mobile APM Load Times for Android, iOS, React Native, and Flutter

How to calculate Mobile APM screen load times

Mobile APM provides load time metrics to help you understand how long it takes for your mobile app screens to load. These load times are calculated by capturing start and end timestamps during specific lifecycle callbacks. 

Load times for native agents will be sent to our server automatically by subtracting the start timestamp from the end timestamp, i.e., end-start.

The following sections explain how load times are calculated across different platforms.

Android

The Start Timestamp is captured in the first occurrence of any of the following lifecycle callbacks for every screen loading in the application:
  1. onActivityCreated
  2. onActivityStarted
The End Timestamp is captured in the following lifecycle callback:
  1. onActivityResumed
Formula:
Total load time = onActivityResumed - (onActivityCreated | onActivityStarted)

iOS

The Start Timestamp is captured in the first occurrence of any of the following lifecycle callbacks for every view controller loading in the application:
  1. loadView
  2. viewDidLoad
  3. viewWillAppear

The End Timestamp is captured in the following lifecycle callback:
  1. viewDidAppear
Formula:
Total load time = viewDidAppear - (loadView | viewDidLoad | viewWillAppear)

React Native

For React Native apps, load times can be captured using a custom API along with screen data. Detailed steps for screen tracking and obtaining load times are provided in this help documentation.

Flutter

In Flutter apps, a custom API must be used to capture screen load times. Instructions on how to implement screen tracking for Flutter apps are provided in this help documentation.