INNER CODE UNIT · Kotlin

BaselineProfileGenerator

Swordfish90/Lemuroid · baselineprofile/src/main/java/com/swordfish/lemuroid/baselineprofile/BaselineProfileGenerator.kt:35

class BaselineProfileGenerator {
    @get:Rule
    val rule = BaselineProfileRule()

    @Test
    fun generate() {
        // This example works only with the variant with application id `com.swordfish.lemuroid`."
        rule.collect(
            packageName = "com.swordfish.lemuroid",
            // See: https://d.android.com/topic/performance/baselineprofiles/dex-layout-optimizations
            includeInStartupProfile = true,
        ) {
            // 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.

            // Start default activity for your app
            pressHome()
            startActivityAndWait()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…