Assigned
Status Update
Comments
ra...@google.com <ra...@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
Description
Component used: androidx.benchmark-benchmark-macro-junit4 Version used: 1.3.3 Devices/Android versions reproduced on: Oppo CPH2553, Android 14
Running macrobenchmark for my app with StartupMode.COLD and
pressHome() startActivityAndWait()
I get the following: java.lang.IllegalStateException: File doesn't exist! at androidx.benchmark.Outputs.writeFile(Outputs.kt:133) at androidx.benchmark.Outputs.writeFile$default(Outputs.kt:121) at androidx.benchmark.perfetto.PerfettoCaptureWrapper.stop(PerfettoCaptureWrapper.kt:84) at androidx.benchmark.perfetto.PerfettoCaptureWrapper.record(PerfettoCaptureWrapper.kt:140) at androidx.benchmark.perfetto.PerfettoCaptureWrapper.record$default(PerfettoCaptureWrapper.kt:95) at androidx.benchmark.macro.MacrobenchmarkPhaseKt.runPhase(MacrobenchmarkPhase.kt:105) at androidx.benchmark.macro.MacrobenchmarkKt$macrobenchmark$4.invoke(Macrobenchmark.kt:267) at androidx.benchmark.macro.MacrobenchmarkKt$macrobenchmark$4.invoke(Macrobenchmark.kt:264) at androidx.benchmark.perfetto.PerfettoTraceProcessor$Companion.runServer-VtjQ1oo(PerfettoTraceProcessor.kt:133) at androidx.benchmark.perfetto.PerfettoTraceProcessor$Companion.runServer(PerfettoTraceProcessor.kt:108) at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmark(Macrobenchmark.kt:264) at androidx.benchmark.macro.MacrobenchmarkKt.macrobenchmarkWithStartupMode(Macrobenchmark.kt:401) at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated(MacrobenchmarkRule.kt:108) at androidx.benchmark.macro.junit4.MacrobenchmarkRule.measureRepeated$default(MacrobenchmarkRule.kt:99) at com.waltz.benchmark.ExampleStartupBenchmark.startup(ExampleStartupBenchmark.kt:31) at com.waltz.benchmark.ExampleStartupBenchmark.startupNoCompilation(ExampleStartupBenchmark.kt:43)