File tree Expand file tree Collapse file tree
benchmarks/src/main/java/com/aquib/androidperflab/benchmarks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ jobs:
6666 - name : Run Macrobenchmarks
6767 uses : reactivecircus/android-emulator-runner@v2
6868 with :
69- api-level : 30
69+ api-level : 34
7070 target : default
7171 arch : x86_64
72- emulator-boot-timeout : 900 # Increase from 600 to 900 seconds (15 minutes)
73- emulator-options : -no-snapshot-load -no-snapshot-save -no-window -gpu swiftshader_indirect -no-audio
72+ emulator-boot-timeout : 600
73+ disable-animations : true
7474 script : ./gradlew :benchmarks:connectedBenchmarkBenchmarkAndroidTest
7575
7676 - name : Parse Benchmark Results
Original file line number Diff line number Diff line change @@ -94,6 +94,13 @@ class ScrollBenchmark {
9494 iterations = 5 ,
9595 setupBlock = {
9696 pressHome()
97+ },
98+ measureBlock = {
99+ // startActivityAndWait() is called here (inside measureBlock) so that
100+ // navigation to the target screen is repeated for every COLD iteration.
101+ // setupBlock runs only once before all iterations; with StartupMode.COLD
102+ // the process is killed before each measureBlock, so any navigation done
103+ // in setupBlock is lost by iteration 2.
97104 startActivityAndWait()
98105
99106 val fab = device.wait(
@@ -107,9 +114,6 @@ class ScrollBenchmark {
107114 RENDER_TIMEOUT_MS ,
108115 )
109116 check(listAppeared) { " '$listContentDesc ' did not appear within ${RENDER_TIMEOUT_MS } ms" }
110- },
111- measureBlock = {
112- device.wait(Until .hasObject(By .desc(listContentDesc)), RENDER_TIMEOUT_MS )
113117
114118 val list = device.findObject(By .desc(listContentDesc))
115119 ? : throw RuntimeException (" List '$listContentDesc ' not found" )
You can’t perform that action at this time.
0 commit comments