Skip to content

Commit 93f9401

Browse files
author
Murat Yener
committed
Baseline Profiles API change 'collectStableBaselineProfile()' is changed to 'collect()'
1 parent 9cd390c commit 93f9401

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.samples.apps.nowinandroid.baselineprofile
1818

19-
import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
2019
import androidx.benchmark.macro.junit4.BaselineProfileRule
2120
import com.google.samples.apps.nowinandroid.PACKAGE_NAME
2221
import com.google.samples.apps.nowinandroid.bookmarks.goToBookmarksScreen
@@ -31,13 +30,12 @@ import org.junit.Test
3130
/**
3231
* Generates a baseline profile which can be copied to `app/src/main/baseline-prof.txt`.
3332
*/
34-
@ExperimentalBaselineProfilesApi
3533
class BaselineProfileGenerator {
3634
@get:Rule val baselineProfileRule = BaselineProfileRule()
3735

3836
@Test
3937
fun generate() =
40-
baselineProfileRule.collectBaselineProfile(PACKAGE_NAME) {
38+
baselineProfileRule.collect(PACKAGE_NAME) {
4139
// This block defines the app's critical user journey. Here we are interested in
4240
// optimizing for app startup. But you can also navigate and scroll
4341
// through your most important UI.

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ androidxDataStore = "1.0.0"
1515
androidxEspresso = "3.5.0"
1616
androidxHiltNavigationCompose = "1.0.0"
1717
androidxLifecycle = "2.6.0-alpha05"
18-
androidxMacroBenchmark = "1.1.1"
18+
androidxMacroBenchmark = "1.2.0-alpha16"
1919
androidxMetrics = "1.0.0-alpha03"
2020
androidxNavigation = "2.5.3"
2121
androidxProfileinstaller = "1.2.1"

0 commit comments

Comments
 (0)