Skip to content

Commit bd3c5f4

Browse files
authored
Remove "dropped frames" metric (#3)
Remove legacy experimental metric which was proven to be too confusing and useless most of the time. In the end it was effectively replaced with `totalFreezeTimeMs`
1 parent 25054b8 commit bd3c5f4

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

perfsuite/src/main/java/com/booking/perfsuite/rendering/RenderingMetrics.kt

-12
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ public data class RenderingMetrics(
2121
*/
2222
val frozenFrames: Long,
2323

24-
/**
25-
* Amount of "good" frames that potentially could be rendered, but were "dropped" due to
26-
* rendering performance issues.
27-
*
28-
* For instance if we target 60fps, the "good" frame would be any frame rendered for less than
29-
* 16ms. But when we see "slow" frame that take 48ms to render, it spend the same time to render
30-
* as 3 "good" frames would spend. That means that due to performance issue the app has rendered
31-
* 1 frame, but 2 potentially good frames were dropped
32-
*/
33-
val droppedFrames: Long,
34-
3524
/**
3625
* Total time of freezing the UI due to rendering of the slow frames per screen session.
3726
* This metric accumulates all freeze durations during the screen session
@@ -44,4 +33,3 @@ public data class RenderingMetrics(
4433
*/
4534
val foregroundTimeMs: Long? = null
4635
)
47-

perfsuite/src/main/java/com/booking/perfsuite/rendering/RenderingMetricsMapper.kt

-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public object RenderingMetricsMapper {
2222
var total = 0L
2323
var slow = 0L
2424
var frozen = 0L
25-
var dropped = 0L
2625
var totalFreezeTime = 0L
2726

2827
totalMetrics.forEach { frameDuration, numberOfFrames ->
@@ -36,15 +35,12 @@ public object RenderingMetricsMapper {
3635
totalFreezeTime += frameDuration * numberOfFrames
3736
}
3837
total += numberOfFrames.toLong()
39-
40-
dropped += (frameDuration / SLOW_FRAME_THRESHOLD_MS) * numberOfFrames
4138
}
4239

4340
return RenderingMetrics(
4441
totalFrames = total,
4542
slowFrames = slow,
4643
frozenFrames = frozen,
47-
droppedFrames = dropped,
4844
totalFreezeTimeMs = totalFreezeTime,
4945
foregroundTimeMs = foregroundTime
5046
)

0 commit comments

Comments
 (0)