Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 791a41e6ce37dad1eac6ac17297390bf3e788fad
Author: Chris Craik <ccraik@google.com>
Date: Mon Apr 24 11:33:50 2023
Fixed frame metric drops caused by misaligned frame ids
Test: FrameTimingQueryTest
Fixes: 279088460
Relnote: "Fix FrameTimingMetric ignoring frames with inconsistent
frame IDs. This would cause some animations on recent platform
versions (31+) to ignore many frames while RenderThread was
rendering."
Change-Id: I747d23e6f5f38eda2c51ee3d26929fa4130e297c
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/FrameTimingQueryTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/FrameTimingQuery.kt
https://android-review.googlesource.com/2558151
Branch: androidx-main
commit 791a41e6ce37dad1eac6ac17297390bf3e788fad
Author: Chris Craik <ccraik@google.com>
Date: Mon Apr 24 11:33:50 2023
Fixed frame metric drops caused by misaligned frame ids
Test: FrameTimingQueryTest
Fixes: 279088460
Relnote: "Fix FrameTimingMetric ignoring frames with inconsistent
frame IDs. This would cause some animations on recent platform
versions (31+) to ignore many frames while RenderThread was
rendering."
Change-Id: I747d23e6f5f38eda2c51ee3d26929fa4130e297c
M benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/FrameTimingQueryTest.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/CompilationMode.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/Metric.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/perfetto/FrameTimingQuery.kt
na...@google.com <na...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-macro:1.2.0-alpha14
Description
Macrobenchmark FrameTimingMetric makes a couple assumptions that I'm not seeing hold true on the trace above:
actual <nr>
expected <nr>
Choreographer#doFrame <nr>
DrawFrame <nr>
Note: we observe instead that frame numbers for actual/expected get out of sync, see screenshot.
Note: we observe instead that the actual frame is wrapping a separate renderthread render
The problem
Together, these mean that macrobenchmarks drop many frames, and don't report them as part of metrics. In this scenario (MotionLayoutBenchmark#messageJson), it's roughly ~100 frames dropped out of ~140.
See also b/210605870