0.3.13
This commit is contained in:
@@ -63,6 +63,24 @@ class HomeBenchmark {
|
||||
measureBlock = { exerciseHome() },
|
||||
)
|
||||
|
||||
/**
|
||||
* Keeps the remote moving long enough to expose allocation, image-cache and GC churn
|
||||
* that a single trip through the first four shelves can hide. Run this on a constrained
|
||||
* television as the sustained-navigation gate for Home, Shows and Movies rows.
|
||||
*/
|
||||
@Test
|
||||
fun sustainedHomeDpadNavigation() = benchmarkRule.measureRepeated(
|
||||
packageName = PACKAGE_NAME,
|
||||
metrics = listOf(FrameTimingMetric()),
|
||||
compilationMode = CompilationMode.Partial(),
|
||||
startupMode = StartupMode.WARM,
|
||||
iterations = 3,
|
||||
setupBlock = { startActivityAndWait() },
|
||||
measureBlock = {
|
||||
repeat(SUSTAINED_CYCLES) { exerciseHome() }
|
||||
},
|
||||
)
|
||||
|
||||
private fun MacrobenchmarkScope.exerciseHome() {
|
||||
// Do not wait between presses: a real performance problem is most visible while a
|
||||
// viewer holds the remote and focus animations, lazy composition and image decode
|
||||
@@ -91,5 +109,6 @@ class HomeBenchmark {
|
||||
const val HORIZONTAL_PRESSES = 12
|
||||
const val HORIZONTAL_PRESSES_PER_ROW = 6
|
||||
const val VERTICAL_PRESSES = 4
|
||||
const val SUSTAINED_CYCLES = 8
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user