Skip to content

Commit

Permalink
Merge pull request #474 from skydoves/plugin/baseline
Browse files Browse the repository at this point in the history
Integrate Baseline Profile plugin
  • Loading branch information
skydoves authored Aug 26, 2023
2 parents bdcd80a + 56bdda1 commit 805e2c7
Show file tree
Hide file tree
Showing 13 changed files with 19,908 additions and 171 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/baseline-profile-amender.yml

This file was deleted.

20 changes: 5 additions & 15 deletions .github/workflows/baseline-profile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

# Sets gradle up
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v2.7.0

# Grants execute permission to gradle (safety step)
- name: Grant Permissions to gradlew
Expand All @@ -54,32 +54,22 @@ jobs:
# This allows us to build most of what we need without the emulator running
# and using resources
- name: Build app and benchmark
run: ./gradlew :benchmark:assembleBenchmark :benchmark-app:assembleBenchmark
run: ./gradlew :benchmark-app:assembleBenchmark

# Cleans managed device if previously settle and space currently is not available
- name: Clean Managed Devices
run: ./gradlew cleanManagedDevices --unused-only

# Generates Baseline Profile
- name: Generate Baseline Profile
run: ./gradlew :benchmark:pixel2Api31BenchmarkAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile -Dorg.gradle.workers.max=4

# Sets the Baseline Profile on its proper place so it gets correctly bundled into Play Store
- name: Move & Rename Baseline Profiles
run: |
mv -f benchmark/build/outputs/managed_device_android_test_additional_output/pixel2Api31/BaselineProfileGenerator_startup-baseline-prof.txt app/src/main/baseline-prof.txt
# Run bash for baseline profile
- name: Run Bash for Baseline Profile Amender
run: |
./bash/baseline-profile-amender.sh
run: ./gradlew generateBaselineProfile -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=20 -Dorg.gradle.workers.max=4

# Create Pull Request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Generate baseline profiles"
title: "Generate baseline profiles"
delete-branch: true
reviewers: skydoves
branch: actions/baseline-profiles
branch: actions/baseline-profiles
9 changes: 9 additions & 0 deletions balloon-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.kotlin.android.get().pluginId)
id(libs.plugins.nexus.plugin.get().pluginId)
id(libs.plugins.baseline.profile.get().pluginId)
}

apply(from = "${rootDir}/scripts/publish-module.gradle.kts")
Expand Down Expand Up @@ -59,6 +60,12 @@ android {
}
}

baselineProfile {
filter {
include("com.skydoves.balloon.compose.**")
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf(
"-Xexplicit-api=strict",
Expand All @@ -80,4 +87,6 @@ dependencies {
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.lifecycle)

baselineProfile(project(":benchmark"))
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Lcom/skydoves/balloon/compose/BalloonComposeView;
HSPLcom/skydoves/balloon/compose/BalloonComposeView;-><init>(Landroid/view/View;ZLcom/skydoves/balloon/Balloon$Builder;Ljava/util/UUID;)V
HPLcom/skydoves/balloon/compose/BalloonComposeView;-><init>(Landroid/view/View;ZLcom/skydoves/balloon/Balloon$Builder;Ljava/util/UUID;)V
HSPLcom/skydoves/balloon/compose/BalloonComposeView;->Content(Landroidx/compose/runtime/Composer;I)V
PLcom/skydoves/balloon/compose/BalloonComposeView;->dispose$balloon_compose_release()V
HSPLcom/skydoves/balloon/compose/BalloonComposeView;->getBalloon()Lcom/skydoves/balloon/Balloon;
Expand All @@ -14,13 +14,13 @@ Lcom/skydoves/balloon/compose/BalloonComposeView$Content$4;
HSPLcom/skydoves/balloon/compose/BalloonComposeView$Content$4;-><init>(Lcom/skydoves/balloon/compose/BalloonComposeView;I)V
Lcom/skydoves/balloon/compose/BalloonKt;
HSPLcom/skydoves/balloon/compose/BalloonKt;->Balloon$lambda$2(Landroidx/compose/runtime/State;)Lkotlin/jvm/functions/Function2;
HSPLcom/skydoves/balloon/compose/BalloonKt;->Balloon(Landroidx/compose/ui/Modifier;Lcom/skydoves/balloon/Balloon$Builder;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
HSPLcom/skydoves/balloon/compose/BalloonKt;->BalloonLayout(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
HPLcom/skydoves/balloon/compose/BalloonKt;->Balloon(Landroidx/compose/ui/Modifier;Lcom/skydoves/balloon/Balloon$Builder;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V
HPLcom/skydoves/balloon/compose/BalloonKt;->BalloonLayout(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
HSPLcom/skydoves/balloon/compose/BalloonKt;->access$Balloon$lambda$2(Landroidx/compose/runtime/State;)Lkotlin/jvm/functions/Function2;
HSPLcom/skydoves/balloon/compose/BalloonKt;->access$BalloonLayout(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V
Lcom/skydoves/balloon/compose/BalloonKt$Balloon$1;
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$1;-><init>(Lcom/skydoves/balloon/Balloon$Builder;ILcom/skydoves/balloon/compose/BalloonComposeView;)V
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$1;->invoke(Landroidx/compose/ui/layout/LayoutCoordinates;)V
HPLcom/skydoves/balloon/compose/BalloonKt$Balloon$1;->invoke(Landroidx/compose/ui/layout/LayoutCoordinates;)V
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/skydoves/balloon/compose/BalloonKt$Balloon$3;
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$3;-><init>(Landroidx/compose/ui/platform/ComposeView;)V
Expand Down Expand Up @@ -48,8 +48,6 @@ HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1;->in
Lcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$1;
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$1;-><clinit>()V
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$1;-><init>()V
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$1;->invoke(Landroidx/compose/ui/semantics/SemanticsPropertyReceiver;)V
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$2;
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$2;-><init>(Landroidx/compose/runtime/State;)V
HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$balloonComposeView$1$1$1$2;->invoke(Landroidx/compose/runtime/Composer;I)V
Expand All @@ -62,19 +60,13 @@ HSPLcom/skydoves/balloon/compose/BalloonKt$Balloon$id$1;->invoke()Ljava/util/UUI
Lcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1;
HSPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1;-><clinit>()V
HSPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1;-><init>()V
HSPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1;->measure-3p2s80s(Landroidx/compose/ui/layout/MeasureScope;Ljava/util/List;J)Landroidx/compose/ui/layout/MeasureResult;
HPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1;->measure-3p2s80s(Landroidx/compose/ui/layout/MeasureScope;Ljava/util/List;J)Landroidx/compose/ui/layout/MeasureResult;
Lcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1$measure$1;
HSPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1$measure$1;-><init>(Ljava/util/List;)V
HSPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1$measure$1;->invoke(Landroidx/compose/ui/layout/Placeable$PlacementScope;)V
HSPLcom/skydoves/balloon/compose/BalloonKt$BalloonLayout$1$measure$1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
Lcom/skydoves/balloon/compose/BalloonLayoutInfo;
HSPLcom/skydoves/balloon/compose/BalloonLayoutInfo;-><init>(FFII)V
Lcom/skydoves/balloon/compose/BalloonSemanticsKt;
HSPLcom/skydoves/balloon/compose/BalloonSemanticsKt;-><clinit>()V
HSPLcom/skydoves/balloon/compose/BalloonSemanticsKt;->balloon(Landroidx/compose/ui/semantics/SemanticsPropertyReceiver;)V
Lcom/skydoves/balloon/compose/BalloonSemanticsKt$IsBalloon$1;
HSPLcom/skydoves/balloon/compose/BalloonSemanticsKt$IsBalloon$1;-><clinit>()V
HSPLcom/skydoves/balloon/compose/BalloonSemanticsKt$IsBalloon$1;-><init>()V
Lcom/skydoves/balloon/compose/BalloonWindow;
Lcom/skydoves/balloon/compose/BalloonWindow$DefaultImpls;
HSPLcom/skydoves/balloon/compose/BalloonWindow$DefaultImpls;->showAlignTop$default(Lcom/skydoves/balloon/compose/BalloonWindow;IIILjava/lang/Object;)V
Expand All @@ -86,4 +78,4 @@ Lcom/skydoves/balloon/compose/ComposableSingletons$BalloonComposeViewKt$lambda-1
HSPLcom/skydoves/balloon/compose/ComposableSingletons$BalloonComposeViewKt$lambda-1$1;-><clinit>()V
HSPLcom/skydoves/balloon/compose/ComposableSingletons$BalloonComposeViewKt$lambda-1$1;-><init>()V
Lcom/skydoves/balloon/compose/RememberBalloonBuilderKt;
HSPLcom/skydoves/balloon/compose/RememberBalloonBuilderKt;->rememberBalloonBuilder(Landroid/content/Context;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Lcom/skydoves/balloon/Balloon$Builder;
HPLcom/skydoves/balloon/compose/RememberBalloonBuilderKt;->rememberBalloonBuilder(Landroid/content/Context;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)Lcom/skydoves/balloon/Balloon$Builder;
9 changes: 9 additions & 0 deletions balloon/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ plugins {
id(libs.plugins.android.library.get().pluginId)
id(libs.plugins.kotlin.android.get().pluginId)
id(libs.plugins.nexus.plugin.get().pluginId)
id(libs.plugins.baseline.profile.get().pluginId)
}

apply(from = "${rootDir}/scripts/publish-module.gradle.kts")
Expand Down Expand Up @@ -65,6 +66,12 @@ android {
}
}

baselineProfile {
filter {
include("com.skydoves.balloon.**")
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.freeCompilerArgs += listOf("-Xexplicit-api=strict")
}
Expand All @@ -79,4 +86,6 @@ dependencies {
implementation(libs.androidx.fragment)
implementation(libs.androidx.lifecycle)
implementation(libs.androidx.annotation)

baselineProfile(project(":benchmark"))
}
Loading

0 comments on commit 805e2c7

Please sign in to comment.