Created
September 6, 2022 08:26
-
-
Save bastionkid/5c0eb6c0e57049ac818dd69c12a5342d to your computer and use it in GitHub Desktop.
Baseline Profiles Generator
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
@ExperimentalBaselineProfilesApi | |
@RunWith(AndroidJUnit4::class) | |
class BaselineProfileGenerator { | |
@get:Rule val baselineProfileRule = BaselineProfileRule() | |
@Test | |
fun startup() = | |
baselineProfileRule.collectBaselineProfile(packageName = YOUR_APP_PACKAGE_NAME) { | |
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() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment