在生产环境中衡量移动应用程序的性能

In the illustration above we see 6 frames: 3 frames are good and 3 frames have freezes. That means that 3 good frames were rendered within 16ms and 3 other frames have freezes of different durations. We calculate freeze duration as a difference between the actual frame duration and 16ms of the target frame duration. To calculate total freeze time we need to summarize the durations of all freezes that happen on the screen.

在上面的示例中,我们看到了6个帧:3个帧是良好的,3个帧有冻结。这意味着有3个良好的帧在16ms内渲染完成,另外3个帧有不同持续时间的冻结。我们将冻结持续时间定义为实际帧持续时间与目标帧持续时间16ms之间的差值。要计算总冻结时间,我们需要将屏幕上发生的所有冻结的持续时间相加。

Freeze Time can be the same with different patterns: 1 freeze with 1000ms, 100 freezes with 10ms. Also, freeze time can increase without any additional change just by increased session duration (e.g. when every item of the scrollable list generates some slow frames and the user starts to scroll more it leads to a higher total freeze time).

冻结时间可以有不同的模式:1次冻结持续1000毫秒,100次冻结持续10毫秒。此外,冻结时间可以增加,而不需要任何额外的变化,只需增加会话持续时间(例如,当可滚动列表的每个项目生成一些慢帧并且用户开始更多地滚动时,总冻结时间会增加)。

To catch such situations we are also using 2 additional metrics:

为了捕捉这种情况,我们还使用了2个额外的指标:

  • Freeze Count: The total count of slow frames (slower than 16ms) during a screen session. To see if the pattern of freezes changes.
  • 冻结计数:屏幕会话期间慢帧(慢于16毫秒)的总数。用于查看冻结模式是否发生变化。
  • Session Duration: The screen session duration. To see if session duration changed which might cause freeze time changes.
  • 会话持续时间:屏幕会话的持续时间。用于查看会话持续时间是否发生变化,可能导致冻结时间的变化。

Rationale for choosing the Freeze Time metric

选择冻结时间指标的理由

Both Google and Apple offer metrics for assessing rendering performance. Initially, we adopted a method implemented by Firebase for our rendering performance monitoring, which involved tracking slow frames (>16ms to render) and frozen frames (>700ms). However, we discovered that these metrics did not adequately capture rendering performance degradation.

谷歌和苹果都提供了用于评估渲染性能的度量标准。最初,我们采用了Firebase实现的一种方法来监控渲染性能,该方法涉及跟踪慢帧(渲染时间>16ms)和冻结帧(渲染时间>700ms)。然而,我们发现这些度量标准无法充分捕捉到渲染性能的退化。

For instance, consider a scenario where views in a list a...

开通本站会员,查看完整译文。

trang chủ - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-06 07:33
浙ICP备14020137号-1 $bản đồ khách truy cập$