mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-25 18:38:23 +01:00
Update benchmarking dependencies
This commit is contained in:
parent
f7b335e4fb
commit
5718983f41
@ -66,11 +66,11 @@ android {
|
|||||||
initWith(getByName("release"))
|
initWith(getByName("release"))
|
||||||
buildConfigField("boolean", "PREVIEW", "true")
|
buildConfigField("boolean", "PREVIEW", "true")
|
||||||
|
|
||||||
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
|
matchingFallbacks.add("release")
|
||||||
val debugType = getByName("debug")
|
val debugType = getByName("debug")
|
||||||
signingConfig = debugType.signingConfig
|
|
||||||
versionNameSuffix = debugType.versionNameSuffix
|
versionNameSuffix = debugType.versionNameSuffix
|
||||||
applicationIdSuffix = debugType.applicationIdSuffix
|
applicationIdSuffix = debugType.applicationIdSuffix
|
||||||
matchingFallbacks.add("release")
|
|
||||||
}
|
}
|
||||||
create("benchmark") {
|
create("benchmark") {
|
||||||
initWith(getByName("release"))
|
initWith(getByName("release"))
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -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.1.1"
|
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"]
|
||||||
|
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
package tachiyomi.macrobenchmark
|
package tachiyomi.macrobenchmark
|
||||||
|
|
||||||
import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
|
|
||||||
import androidx.benchmark.macro.junit4.BaselineProfileRule
|
import androidx.benchmark.macro.junit4.BaselineProfileRule
|
||||||
import androidx.test.uiautomator.By
|
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.benchmark",
|
packageName = "eu.kanade.tachiyomi.benchmark",
|
||||||
profileBlock = {
|
profileBlock = {
|
||||||
pressHome()
|
pressHome()
|
||||||
|
Loading…
Reference in New Issue
Block a user