Booking Jun 30, 2022

Rendering Performance Monitoring on Android

Article Summary

Booking.com's Android team built their own rendering performance monitoring system. Here's why Google Play Console metrics weren't enough.

Artem Grishin from Booking.com walks through implementing custom frame monitoring on Android. The article covers how to track slow and frozen frames per screen using FrameMetricsAggregator, going beyond the aggregated app-level data from Android Vitals.

Key Takeaways

Critical Insight

You can build screen-level rendering performance monitoring in about 50 lines of Kotlin using Android Jetpack's FrameMetricsAggregator.

The article includes a complete working implementation you can drop into your app today, plus the exact thresholds Google Play uses for Android Vitals.

About This Article

Problem

Artem Grishin's team at Booking.com needed per-screen rendering performance data. Android Vitals only gave them app-level aggregates with a 2-day reporting delay, so they couldn't detect UX issues in real time.

Solution

They built a custom RenderMonitor class using FrameMetricsAggregator's TOTAL_INDEX metrics and ActivityLifecycleCallbacks. It automatically tracks frame timings when activities resume and pause.

Impact

Now developers can identify slow frames (17-700ms) and frozen frames (700ms+) for each screen. They catch rendering bottlenecks immediately instead of waiting for Google Play Console data.

Recent from Booking

Related Articles