All Products
Search
Document Center

Application startup speed analysis

Last Updated: Jun 23, 2021

One of the advantages of mPaaS is to help you build super stable, high-performance Apps. As an important indicator for measuring App performance, startup speed directly affects the user experience of an App. Through the startup time analysis, you can learn the startup time of the App, and then perform optimization correspondingly, thereby improving the user experience. This tutorial guides you through the steps to analyze application startup time.

Android development

1. Integrate Mobile Analysis Service

You can integrate MAS through Native AAR, mPaaS Inside, or Portal & Bundle. However, only Apps based on the mPaaS framework can use APIs encapsulated in the MAS SDK to collect the startup time.

Integrate Mobile Analysis Service by referring to Access Android. The operations include completing the basic configurations, adding the SDK, and configuring the project. It is recommended that you select the SDK of the latest version.

2. Record startup time logs

 
  1. import com.mpaas.mas.adapter.api.MPLogger;
  2. MPLogger.reportLaunchTime(Context context);

For more information, see Performance log > Startup time.

iOS development

1. Integrate Mobile Analysis Service

Integrate Mobile Analysis Service by referring to Access iOS.

2. Record the startup time logs

The log API varies according to the SDK version. For more information, see Performance log.

View the analysis report

Log in to the console, choose Mobile Analysis Service > Basic analysis > Behavior analysis, and select a date. You can view the startup time report.

  • First startup: It refers to the first startup of an App after it is installed.
  • Non-first startup: It refers to the startup after the first startup.

Only cold startup is involved in the startup time statistics, and the startup time analysis is in quasi real time. That is, you can view the reports immediately after Apps are connected to mPaaS and logs are reported to the log server.