Mobile Development 7 min read

Testing SDK Startup Time: Cold, Warm, and Lukewarm Launches on Android

This article explains how to measure and analyze Android SDK startup performance by defining cold, warm, and lukewarm launches, describing a testing methodology that uses specific device, network, and process conditions, and providing ADB commands and shell scripts to capture total launch time.

360 Tech Engineering
360 Tech Engineering
360 Tech Engineering
Testing SDK Startup Time: Cold, Warm, and Lukewarm Launches on Android

The author, responsible for testing a commercial advertising SDK, discusses the need to evaluate app launch time because media partners often report performance issues that affect user experience.

Android launch types are introduced: Cold Start (app process not running), Warm Start (activity brought to foreground with retained process), Lukewarm Start (partial cold‑start operations), and Warm Start in Chinese terminology (including "温启动"). Definitions are taken from the Android Developers documentation.

For the SDK under test, three launch scenarios are selected—first cold start, non‑first cold start, and warm start—because they differ in cloud‑control requests, configuration fetching, and ad initialization, and they minimize demo impact on measured times.

The testing environment includes using a pure Android device (e.g., Nexus), consistent network conditions (Wi‑Fi, cellular, weak), single‑ vs multi‑process modes, whether splash‑ad pre‑loading is enabled, and the size of ad media that may compete for resources.

Launch time is measured with the ADB command adb shell am –W [packageName]/[packageName.MainActivity] , which returns ThisTime, TotalTime, and WaitTime; TotalTime is used as the primary metric for SDK startup performance.

An example shell snippet for capturing TotalTime is shown: adb shell am start -W $PackageName/$ActivityName | grep TotalTime | awk -F ' ' '{print $2}' | tr -d "\r"

To reduce variability, tests should be repeated, outlier values (highest and lowest) discarded, and the average taken, while ensuring no other apps interfere with the measurement.

The author also reports a problem with the awk syntax in the above pipeline, explaining that the command failed to retrieve data and directing readers to an online awk tutorial for correction.

AndroidCold StartADBStartup PerformanceSDK TestingWarm Start
360 Tech Engineering
Written by

360 Tech Engineering

Official tech channel of 360, building the most professional technology aggregation platform for the brand.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.