Update benchmarking dependencies

(cherry picked from commit 5718983f417f1fe3eec9b484951e3277ac241370)

# Conflicts:
#	app/build.gradle.kts
#	app/src/main/baseline-prof.txt
#	gradle/androidx.versions.toml
#	macrobenchmark/src/main/java/tachiyomi/macrobenchmark/BaselineProfileGenerator.kt
This commit is contained in:
arkon 2023-07-29 22:48:56 -04:00 committed by Jobobby04
parent 1213264951
commit 589dddcc4a
4 changed files with 19298 additions and 7808 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,10 +27,10 @@ guava = "com.google.guava:guava:32.0.1-android"
paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "paging_version" } paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "paging_version" }
paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging_version" } paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging_version" }
benchmark-macro = "androidx.benchmark:benchmark-macro-junit4:1.2.0-alpha13" benchmark-macro = "androidx.benchmark:benchmark-macro-junit4:1.2.0-beta02"
test-ext = "androidx.test.ext:junit-ktx:1.1.5" test-ext = "androidx.test.ext:junit-ktx:1.2.0-alpha01"
test-espresso-core = "androidx.test.espresso:espresso-core:3.5.1" test-espresso-core = "androidx.test.espresso:espresso-core:3.6.0-alpha01"
test-uiautomator = "androidx.test.uiautomator:uiautomator:2.2.0" test-uiautomator = "androidx.test.uiautomator:uiautomator:2.3.0-alpha04"
[bundles] [bundles]
lifecycle = ["lifecycle-common", "lifecycle-process", "lifecycle-runtimektx"] lifecycle = ["lifecycle-common", "lifecycle-process", "lifecycle-runtimektx"]

View File

@ -8,6 +8,7 @@ android {
defaultConfig { defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments["androidx.benchmark.enabledRules"] = "BaselineProfile"
} }
buildTypes { buildTypes {
@ -17,7 +18,7 @@ android {
create("benchmark") { create("benchmark") {
isDebuggable = true isDebuggable = true
signingConfig = getByName("debug").signingConfig signingConfig = getByName("debug").signingConfig
matchingFallbacks += listOf("release") matchingFallbacks.add("release")
} }
} }

View File

@ -5,14 +5,13 @@ import androidx.test.uiautomator.By
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
// @OptIn(ExperimentalBaselineProfilesApi::class)
class BaselineProfileGenerator { class BaselineProfileGenerator {
@get:Rule @get:Rule
val baselineProfileRule = BaselineProfileRule() val baselineProfileRule = BaselineProfileRule()
@Test @Test
fun generate() = baselineProfileRule.collectBaselineProfile( fun generate() = baselineProfileRule.collect(
packageName = "eu.kanade.tachiyomi.sy.benchmark", packageName = "eu.kanade.tachiyomi.sy.benchmark",
profileBlock = { profileBlock = {
pressHome() pressHome()