diff --git a/.github/scripts/run_macrobenchmarks.sh b/.github/scripts/run_macrobenchmarks.sh index b438a4b8a..13247a36d 100644 --- a/.github/scripts/run_macrobenchmarks.sh +++ b/.github/scripts/run_macrobenchmarks.sh @@ -21,10 +21,11 @@ run_benchmark() { adb shell rm /sdcard/Download/*.perfetto-trace || true adb shell rm /sdcard/Download/*.txt || true - # Run only the Startup benchmark + # Run only the Startup Baseline Profile benchmark adb shell am instrument -w \ - -e class com.google.samples.apps.nowinandroid.startup.StartupBenchmark \ + -e class com.google.samples.apps.nowinandroid.startup.StartupBenchmark#startupPrecompiledWithBaselineProfile \ -e androidx.benchmark.suppressErrors EMULATOR \ + -e androidx.benchmark.profiling.mode none \ -e no-isolated-storage true \ -e additionalTestOutputDir /sdcard/Download \ $BENCHMARK_PKG/$TEST_RUNNER diff --git a/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/startup/StartupBenchmark.kt b/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/startup/StartupBenchmark.kt index 4aab929b1..c979beeba 100644 --- a/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/startup/StartupBenchmark.kt +++ b/benchmarks/src/main/kotlin/com/google/samples/apps/nowinandroid/startup/StartupBenchmark.kt @@ -61,7 +61,7 @@ class StartupBenchmark { metrics = BaselineProfileMetrics.allMetrics, compilationMode = compilationMode, // More iterations result in higher statistical significance. - iterations = 20, + iterations = 5, startupMode = COLD, setupBlock = { pressHome()