mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 19:57:04 +05:30
feat(benchmark): switch to new BaselineProfileRule.collectStableBaselineProfile
API
This commit is contained in:
parent
cb619ca6a9
commit
387881181a
1 changed files with 8 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
package dev.msfjarvis.claw.benchmark
|
package dev.msfjarvis.claw.benchmark
|
||||||
|
|
||||||
|
import androidx.benchmark.macro.ExperimentalStableBaselineProfilesApi
|
||||||
import androidx.benchmark.macro.junit4.BaselineProfileRule
|
import androidx.benchmark.macro.junit4.BaselineProfileRule
|
||||||
import androidx.test.filters.MediumTest
|
import androidx.test.filters.MediumTest
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
@ -14,6 +15,7 @@ import org.junit.Before
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
|
@ExperimentalStableBaselineProfilesApi
|
||||||
@MediumTest
|
@MediumTest
|
||||||
class BaselineProfileGenerator {
|
class BaselineProfileGenerator {
|
||||||
@get:Rule val baselineProfileRule = BaselineProfileRule()
|
@get:Rule val baselineProfileRule = BaselineProfileRule()
|
||||||
|
@ -27,5 +29,10 @@ class BaselineProfileGenerator {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun startup() =
|
fun startup() =
|
||||||
baselineProfileRule.collectBaselineProfile(packageName = PACKAGE_NAME) { exploreUI(device) }
|
baselineProfileRule.collectStableBaselineProfile(
|
||||||
|
packageName = PACKAGE_NAME,
|
||||||
|
maxIterations = 5,
|
||||||
|
) {
|
||||||
|
exploreUI(device)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue