Wait for full display in startup benchmarks

Change-Id: Iadd71fe9481d91620e7676dd0be318a1cbe9b4ba
pull/158/head
Tomáš Mlynarič 3 years ago
parent a4e7488888
commit 5d3f3759b1

@ -27,6 +27,7 @@ import androidx.benchmark.macro.StartupTimingMetric
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import com.google.samples.apps.nowinandroid.PACKAGE_NAME
import com.google.samples.apps.nowinandroid.foryou.forYouWaitForContent
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@ -85,5 +86,7 @@ abstract class AbstractStartupBenchmark(private val startupMode: StartupMode) {
}
) {
startActivityAndWait()
// Waits until the content is ready to capture Time To Full Display
forYouWaitForContent()
}
}

Loading…
Cancel
Save