0.2.85
This commit is contained in:
@@ -64,14 +64,32 @@ class HomeBenchmark {
|
||||
)
|
||||
|
||||
private fun MacrobenchmarkScope.exerciseHome() {
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_RIGHT)
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_RIGHT)
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_DOWN)
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_RIGHT)
|
||||
// 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
|
||||
// overlap. Travelling both ways also covers cached artwork and item reuse rather
|
||||
// than measuring only the first decode of each card.
|
||||
repeat(HORIZONTAL_PRESSES) {
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_RIGHT)
|
||||
}
|
||||
repeat(VERTICAL_PRESSES) {
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_DOWN)
|
||||
repeat(HORIZONTAL_PRESSES_PER_ROW) {
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_RIGHT)
|
||||
}
|
||||
}
|
||||
repeat(VERTICAL_PRESSES) {
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_UP)
|
||||
repeat(HORIZONTAL_PRESSES_PER_ROW) {
|
||||
device.pressKeyCode(android.view.KeyEvent.KEYCODE_DPAD_LEFT)
|
||||
}
|
||||
}
|
||||
device.waitForIdle()
|
||||
}
|
||||
|
||||
private companion object {
|
||||
const val PACKAGE_NAME = "com.ponzischeme89.memby"
|
||||
const val HORIZONTAL_PRESSES = 12
|
||||
const val HORIZONTAL_PRESSES_PER_ROW = 6
|
||||
const val VERTICAL_PRESSES = 4
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user