Setup Baseline Profile (#8135)

* Setup Baseline Profile

Adds Baseline Profile generator and startup time test.
Readme included in macrobenchmark module to run the generator.

* changes
This commit is contained in:
Ivan Iskandar
2022-10-04 20:22:55 +07:00
committed by GitHub
parent bbe1608006
commit 3b62396442
12 changed files with 17301 additions and 1 deletions

View File

@@ -75,10 +75,20 @@ android {
applicationIdSuffix = debugType.applicationIdSuffix
matchingFallbacks.add("release")
}
create("benchmark") {
initWith(getByName("release"))
signingConfig = signingConfigs.getByName("debug")
matchingFallbacks.add("release")
isDebuggable = false
versionNameSuffix = "-benchmark"
applicationIdSuffix = ".benchmark"
}
}
sourceSets {
getByName("preview").res.srcDirs("src/debug/res")
getByName("benchmark").res.srcDirs("src/debug/res")
}
flavorDimensions.add("default")
@@ -193,6 +203,7 @@ dependencies {
implementation(androidx.recyclerview)
implementation(androidx.viewpager)
implementation(androidx.glance)
implementation(androidx.profileinstaller)
implementation(androidx.bundles.lifecycle)
@@ -282,6 +293,15 @@ dependencies {
implementation(libs.leakcanary.plumber)
}
androidComponents {
beforeVariants { variantBuilder ->
// Disables standardBenchmark
if (variantBuilder.buildType == "benchmark") {
variantBuilder.enable = variantBuilder.productFlavors.containsAll(listOf("default" to "dev"))
}
}
}
tasks {
withType<Test> {
useJUnitPlatform()