Skip to content

Commit bc97a6e

Browse files
committed
Update CI configuration to use API level 34 and adjust emulator options for benchmark tests
1 parent e9c0723 commit bc97a6e

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

benchmarks/src/main/java/com/aquib/androidperflab/benchmarks/ScrollBenchmark.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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")

0 commit comments

Comments
 (0)