diff --git a/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileBenchmark.kt b/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileBenchmark.kt index e5647665..0802e6d2 100644 --- a/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileBenchmark.kt +++ b/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileBenchmark.kt @@ -45,6 +45,6 @@ class BaselineProfileBenchmark { iterations = 10, startupMode = StartupMode.COLD, compilationMode = compilationMode - ) { tapNavigationDestinations(device) } + ) { exploreUI(device) } } } diff --git a/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileGenerator.kt b/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileGenerator.kt index 5b3fa08a..7d667404 100644 --- a/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileGenerator.kt +++ b/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BaselineProfileGenerator.kt @@ -23,7 +23,5 @@ class BaselineProfileGenerator { @Test fun startup() = - baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) { - tapNavigationDestinations(device) - } + baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) { exploreUI(device) } } diff --git a/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BenchmarkUtils.kt b/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BenchmarkUtils.kt index b474e70e..964aee42 100644 --- a/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BenchmarkUtils.kt +++ b/benchmark/src/main/kotlin/dev/msfjarvis/claw/benchmark/BenchmarkUtils.kt @@ -6,13 +6,16 @@ import androidx.test.uiautomator.UiDevice const val PACKAGE_NAME = "dev.msfjarvis.claw.android" -fun MacrobenchmarkScope.tapNavigationDestinations(device: UiDevice) { +fun MacrobenchmarkScope.exploreUI(device: UiDevice) { startActivityAndWait() device.run { listOf("HOTTEST", "NEWEST", "SAVED").forEach { desc -> findObject(By.desc(desc)).click() waitForIdle() } + findObject(By.desc("HOTTEST")).click() + waitForIdle() + findObjects(By.desc("Open comments")).first().click() + waitForIdle() } - device.waitForIdle() }