From 5b19670fb625757802c5a9b6aca91c453147b67b Mon Sep 17 00:00:00 2001 From: Bnyro Date: Thu, 11 Jul 2024 18:25:10 +0200 Subject: [PATCH] chore: update baseline profiles --- app/release/output-metadata.json | 69 +++++++++++++------ .../BaselineProfileGenerator.kt | 18 ++--- .../baselineprofile/StartupBenchmarks.kt | 9 +-- 3 files changed, 57 insertions(+), 39 deletions(-) diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 09d395263..cbf89e8ae 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -11,23 +11,10 @@ "type": "UNIVERSAL", "filters": [], "attributes": [], - "versionCode": 35, - "versionName": "0.15.0", + "versionCode": 54, + "versionName": "0.24.0", "outputFile": "app-universal-release.apk" }, - { - "type": "ONE_OF_MANY", - "filters": [ - { - "filterType": "ABI", - "value": "x86_64" - } - ], - "attributes": [], - "versionCode": 35, - "versionName": "0.15.0", - "outputFile": "app-x86_64-release.apk" - }, { "type": "ONE_OF_MANY", "filters": [ @@ -37,8 +24,8 @@ } ], "attributes": [], - "versionCode": 35, - "versionName": "0.15.0", + "versionCode": 54, + "versionName": "0.24.0", "outputFile": "app-armeabi-v7a-release.apk" }, { @@ -50,10 +37,23 @@ } ], "attributes": [], - "versionCode": 35, - "versionName": "0.15.0", + "versionCode": 54, + "versionName": "0.24.0", "outputFile": "app-x86-release.apk" }, + { + "type": "ONE_OF_MANY", + "filters": [ + { + "filterType": "ABI", + "value": "x86_64" + } + ], + "attributes": [], + "versionCode": 54, + "versionName": "0.24.0", + "outputFile": "app-x86_64-release.apk" + }, { "type": "ONE_OF_MANY", "filters": [ @@ -63,10 +63,35 @@ } ], "attributes": [], - "versionCode": 35, - "versionName": "0.15.0", + "versionCode": 54, + "versionName": "0.24.0", "outputFile": "app-arm64-v8a-release.apk" } ], - "elementType": "File" + "elementType": "File", + "baselineProfiles": [ + { + "minApi": 28, + "maxApi": 30, + "baselineProfiles": [ + "baselineProfiles/1/app-universal-release.dm", + "baselineProfiles/1/app-armeabi-v7a-release.dm", + "baselineProfiles/1/app-x86-release.dm", + "baselineProfiles/1/app-x86_64-release.dm", + "baselineProfiles/1/app-arm64-v8a-release.dm" + ] + }, + { + "minApi": 31, + "maxApi": 2147483647, + "baselineProfiles": [ + "baselineProfiles/0/app-universal-release.dm", + "baselineProfiles/0/app-armeabi-v7a-release.dm", + "baselineProfiles/0/app-x86-release.dm", + "baselineProfiles/0/app-x86_64-release.dm", + "baselineProfiles/0/app-arm64-v8a-release.dm" + ] + } + ], + "minSdkVersionForDexing": 21 } \ No newline at end of file diff --git a/baselineprofile/src/main/java/com/github/libretube/baselineprofile/BaselineProfileGenerator.kt b/baselineprofile/src/main/java/com/github/libretube/baselineprofile/BaselineProfileGenerator.kt index 22c48bd6e..c73387e81 100644 --- a/baselineprofile/src/main/java/com/github/libretube/baselineprofile/BaselineProfileGenerator.kt +++ b/baselineprofile/src/main/java/com/github/libretube/baselineprofile/BaselineProfileGenerator.kt @@ -65,16 +65,16 @@ class BaselineProfileGenerator { // https://d.android.com/training/testing/other-components/ui-automator } } +} - private fun MacrobenchmarkScope.loadHomePage() { - // Select a Piped instance on the initial screen and click the OK button - val selector = By.clazz(RadioButton::class.java) - device.wait(Until.hasObject(selector), 1000) - device.findObject(selector)?.click() +fun MacrobenchmarkScope.loadHomePage() { + // Select a Piped instance on the initial screen and click the OK button + val selector = By.clazz(RadioButton::class.java) + device.wait(Until.hasObject(selector), 1000) + device.findObject(selector)?.click() - device.findObject(By.text("OK"))?.click() + device.findObject(By.text("OK"))?.click() - // Wait until the home page is loaded - device.wait(Until.hasObject(By.text("Home")), 1000) - } + // Wait until the home page is loaded + device.wait(Until.hasObject(By.text("Home")), 1000) } \ No newline at end of file diff --git a/baselineprofile/src/main/java/com/github/libretube/baselineprofile/StartupBenchmarks.kt b/baselineprofile/src/main/java/com/github/libretube/baselineprofile/StartupBenchmarks.kt index 8a1e1efc9..a1d1685dd 100644 --- a/baselineprofile/src/main/java/com/github/libretube/baselineprofile/StartupBenchmarks.kt +++ b/baselineprofile/src/main/java/com/github/libretube/baselineprofile/StartupBenchmarks.kt @@ -62,14 +62,7 @@ class StartupBenchmarks { measureBlock = { startActivityAndWait() - // TODO Add interactions to wait for when your app is fully drawn. - // The app is fully drawn when Activity.reportFullyDrawn is called. - // For Jetpack Compose, you can use ReportDrawn, ReportDrawnWhen and ReportDrawnAfter - // from the AndroidX Activity library. - - // Check the UiAutomator documentation for more information on how to - // interact with the app. - // https://d.android.com/training/testing/other-components/ui-automator + loadHomePage() } ) }