Assigned
Status Update
Comments
cc...@google.com <cc...@google.com> #2
Update: according to the trace, dex2oat starts at the same moment as the application. So i guess, the problem lays in xiaomi firmware that starts the optimization with the application during benchmark
cc...@google.com <cc...@google.com> #3
Over to Rahul, since we talked about what it would take to make this happen. First thing is to see if there's prior art in Hawkeye.
ys...@google.com <ys...@google.com> #4
androidx.activity.compose.ReportDrawnAfter or androidx.activity.ComponentActivity.reportFullyDrawn are potentially interesting hooks.
Is there anything that this could do for the class of Compose apps? You wouldn't need to rely on any new functionality in the platform Activity.
Description
timeToFullDisplayMs metric is missed in report and shown only if delay is added to test.
@Test
public void startup() {
mBenchmarkRule.measureRepeated(
TEST_PACKAGE,
Collections.singletonList(new StartupTimingMetric()),
CompilationMode.DEFAULT,
StartupMode.COLD,
5,
scope -> {
scope.pressHome();
scope.startActivityAndWait();
return Unit.INSTANCE;
});
}
But according to documentation timeToFullDisplayMs should wait reportFullyDrawn() call:
StartupTimingMetric captures app startup timing metrics with these values:
timeToInitialDisplayMs – Time from the system receiving a launch intent until rendering the first frame of the destination Activity.
timeToFullDisplayMs – Time from the system receiving a launch intent until the application reports fully drawn via reportFullyDrawn method. The measurement stops at the completion of rendering the first frame after (or containing) the reportFullyDrawn() call. This measurement may not be available on Android 10 (API level 29) and lower.