Skip to content

Commit f39c37c

Browse files
Generate baseline profile for free and pro app (#1136)
1 parent 76056c9 commit f39c37c

File tree

6 files changed

+32116
-2132
lines changed

6 files changed

+32116
-2132
lines changed

app/src/freeRelease/generated/baselineProfiles/baseline-prof.txt

Lines changed: 553 additions & 1064 deletions
Large diffs are not rendered by default.

app/src/freeRelease/generated/baselineProfiles/startup-prof.txt

Lines changed: 553 additions & 1064 deletions
Large diffs are not rendered by default.

app/src/proRelease/generated/baselineProfiles/baseline-prof.txt

Lines changed: 15502 additions & 0 deletions
Large diffs are not rendered by default.

app/src/proRelease/generated/baselineProfiles/startup-prof.txt

Lines changed: 15502 additions & 0 deletions
Large diffs are not rendered by default.

baselineprofile/build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ android {
5151
// You can specify to run the generators on a managed devices or connected devices.
5252
baselineProfile {
5353
// This specifies the managed devices to use that you run the tests on.
54-
// managedDevices.clear()
55-
// managedDevices += "pixel6Api34"
56-
useConnectedDevices = true
54+
managedDevices.clear()
55+
managedDevices += "pixel6Api34"
56+
useConnectedDevices = false
57+
// mergeIntoMain = true
5758
}
5859

5960
dependencies {

baselineprofile/src/main/java/com/techpaliyal/baselineprofile/BaselineProfileGenerator.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ class BaselineProfileGenerator {
4242
fun generate() {
4343
// The application id for the running build variant is read from the instrumentation arguments.
4444
rule.collect(
45-
packageName = "com.yogeshpaliyal.keypass",
45+
packageName = InstrumentationRegistry.getArguments().getString("targetAppId")
46+
?: throw Exception("targetAppId not passed as instrumentation runner arg"),
4647

4748
// See: https://d.android.com/topic/performance/baselineprofiles/dex-layout-optimizations
4849
includeInStartupProfile = true

0 commit comments

Comments
 (0)