-
-
Save skydoves/c450fec8148c3dd9f72c1c74e72c34fc to your computer and use it in GitHub Desktop.
baseline_proflies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BaselineProfileGenerator { | |
@get:Rule val baselineProfileRule = BaselineProfileRule() | |
@Test | |
fun startup() = | |
baselineProfileRule.collectBaselineProfile( | |
packageName = "com.google.samples.apps.nowinandroid" | |
) { | |
pressHome() | |
// This block defines the app's critical user journey. Here we are interested in | |
// optimizing for app startup. But you can also navigate and scroll | |
// through your most important UI. | |
startActivityAndWait() | |
device.waitForIdle() | |
device.run { | |
findObject(By.text("Interests")) | |
.click() | |
waitForIdle() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment