Interaction Latency: Square's User-Centric Mobile Performance Metric
ScyllaDB
92 views
26 slides
Jul 01, 2024
Slide 1 of 26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
About This Presentation
Mobile performance metrics often take inspiration from the backend world and measure resource usage (CPU usage, memory usage, etc) and workload durations (how long a piece of code takes to run).
However, mobile apps are used by humans and the app performance directly impacts their experience, so we...
Mobile performance metrics often take inspiration from the backend world and measure resource usage (CPU usage, memory usage, etc) and workload durations (how long a piece of code takes to run).
However, mobile apps are used by humans and the app performance directly impacts their experience, so we should primarily track user-centric mobile performance metrics. Following the lead of tech giants, the mobile industry at large is now adopting the tracking of app launch time and smoothness (jank during motion).
At Square, our customers spend most of their time in the app long after it's launched, and they don't scroll much, so app launch time and smoothness aren't critical metrics. What should we track instead?
This talk will introduce you to Interaction Latency, a user-centric mobile performance metric inspired from the Web Vital metric Interaction to Next Paint"" (web.dev/inp). We'll go over why apps need to track this, how to properly implement its tracking (it's tricky!), how to aggregate this metric and what thresholds you should target.
Size: 6.86 MB
Language: en
Added: Jul 01, 2024
Slides: 26 pages
Slide Content
Interaction Latency: Squareβs User-Centric Mobile Performance Metric Pierre-Yves Ricau / p-y.wtf Android Distinguished Engineer at Square β Block
Testing parties π₯³
Measure resource usage?
Workload durations?
User-Centric Performance Metrics!
User-Centric performance Two broad categories Smoothness Is motion janky? Responsiveness Delay between user action and visible response from system. Human threshold: 69 ms Actual threshold: contextual
Responsiveness
π§
π§ π
π§ π π±
π§ π π± πΈ
π§ π π± πΈ π
π§ π π± πΈ π
π§ π π± πΈ π
Responsiveness Human threshold: 69 ms tactuallabs.com/papers/howMuchFasterIsFastEnoughCHI15.pdf Actual threshold: contextual Load web page App Launch Tap βLikeβ blog.p-y.wtf/user-centric-mobile-performance blog.p-y.wtf/tracking-android-app-launch-in-production
Interaction Latency: span in onClick? showAboutScreenButton.setOnClickListener { val span = tracer.buildSpan("showAboutScreen").start() findNavController().navigate(R.id.about_screen) span.finish() }
Interaction Latency Random task App Main thread System π Dispatch UP onClick + update UI πΈ Render Random task UP vsync start Display Total Interaction Latency onClick span measure
Measuring interaction latency No good APIs or SDK for this today Start: hook into touch dispatching pipeline End: hook into frame rendering pipeline dev.to/pyricau/tap-response-time-jetpack-navigation-4738 github.com/square/papa
Metric Aggregation Square: P90 Per hardware type, app, app version, etc. Sampling Bias droidcon.com/2023/07/20/combating-sampling-bias-in-production-how-to-collect-and-interpret-performance-data-to-drive-growth/
Thresholds <= 100 ms <= 200 ms 200 - 500 ms >= 500 ms IDEAL ACCEPTABLE DEGRADED PAINFUL Source: web.dev/inp