Fixed
Status Update
Comments
cc...@google.com <cc...@google.com>
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 90dbaa2321b8d49e872df82a650ec4c0ff1dfac0
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Wed Dec 13 16:01:01 2023
Wait for 1 second after SAVE_PROFILE broadcast.
Fixes: b/316082056
Test: Existing unit tests.
Change-Id: I85a50e775f8b997c9a69c7a40d1e2b59561a10b1
Relnote: Macrobenchmark now waits for `1 second` for the target application to flush an ART profile (previously it waited for `500 ms`).
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/MacrobenchmarkScope.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt
https://android-review.googlesource.com/2874298
Branch: androidx-main
commit 90dbaa2321b8d49e872df82a650ec4c0ff1dfac0
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Wed Dec 13 16:01:01 2023
Wait for 1 second after SAVE_PROFILE broadcast.
Fixes:
Test: Existing unit tests.
Change-Id: I85a50e775f8b997c9a69c7a40d1e2b59561a10b1
Relnote: Macrobenchmark now waits for `1 second` for the target application to flush an ART profile (previously it waited for `500 ms`).
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/MacrobenchmarkScope.kt
M benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt
pr...@google.com <pr...@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.3.0-alpha01
Description
Background
The save profile broadcast sent by Macrobenchmark can take over 500ms to complete on lower-end devices.
On a Pixel 1 running Android 10, it takes ~500ms. For A J2 Core running Android 8, it takes ~700ms to complete. A more conservative 1s wait may be better to avoid non-determinism in profile data collection.
See attached screenshots.
The offending code in macrobenchmark is here:https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:benchmark/benchmark-macro/src/main/java/androidx/benchmark/macro/ProfileInstallBroadcast.kt;l=165?q=saveProfile