Measuring Performance for iOS Apps at Uber Scale

Rajat Sharma, Ugo Nwakama
10 min readintermediate
--
View Original

Overview

The article discusses how Uber measures app performance, particularly focusing on iOS app startup latency. It outlines the tools and processes used to ensure high performance and reliability, emphasizing the importance of understanding app behavior in production environments.

What You'll Learn

1

How to measure app startup latency effectively in iOS applications

2

Why understanding cold and hot app launches is crucial for user experience

3

How to leverage MetricKit for app performance metrics

4

When to use custom metrics alongside system-provided metrics for better insights

Prerequisites & Requirements

  • Understanding of iOS app lifecycle and performance metrics
  • Familiarity with Apple's MetricKit(optional)

Key Questions Answered

How does Uber measure app startup latency on iOS?
Uber measures app startup latency by tracking the time from when the user taps the app icon to when the first responder view is available. This includes both pre-main and post-main spans, which are further analyzed to provide insights into performance.
What challenges does pre-warming in iOS 15 introduce for measuring startup latency?
Pre-warming in iOS 15 complicates the measurement of cold startup latency as the app process may be initialized before the user taps the icon. This leads to inflated pre-main span measurements, necessitating a redesign of the measurement process.
What are the new definitions of app startup latency phases at Uber?
Uber defines two main phases for app startup latency: Pre-launch, measured using MXAppLaunchMetric from process instantiation to didFinishLaunch(), and Post-launch, which tracks the time from didFinishLaunch() until the UI is fully rendered.
How does Uber combine user-based and session-based metrics for performance analysis?
Uber combines user-based average startup latency data from MetricKit with custom session-level post-launch metrics to create a comprehensive view of app performance, allowing for detailed analysis over time.

Technologies & Tools

Backend
Metrickit
Used for measuring app launch metrics and performance statistics.

Key Actionable Insights

1
Implement a robust measurement strategy for app startup latency to enhance user experience.
By accurately measuring startup latency, teams can identify performance bottlenecks and optimize the app launch process, leading to improved user satisfaction.
2
Utilize both system-provided metrics and custom metrics to gain a holistic view of app performance.
Combining different metrics allows for a more comprehensive understanding of app behavior, enabling better decision-making for performance improvements.
3
Regularly review and adjust measurement processes to account for changes in OS behavior, such as pre-warming.
As operating systems evolve, measurement strategies must adapt to maintain accuracy and relevance in performance metrics.

Common Pitfalls

1
Relying solely on system-provided metrics can lead to incomplete performance insights.
System metrics may not capture the full user experience, making it essential to incorporate custom metrics for a more accurate analysis.

Related Concepts

Ios App Lifecycle
Performance Metrics
User Experience Optimization