File tree Expand file tree Collapse file tree 4 files changed +6
-10
lines changed
src/main/java/com/squareup/sample/dungeon/benchmark
performance-poetry/complex-benchmark
src/main/java/com/squareup/benchmarks/performance/complex/poetry/benchmark Expand file tree Collapse file tree 4 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ android {
25
25
}
26
26
27
27
defaultConfig {
28
- minSdk = 23
28
+ minSdk = 28
29
29
targetSdk = libsCatalog.version(" targetSdk" ).toInt()
30
30
31
31
testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change 1
1
package com.squareup.sample.dungeon.benchmark
2
2
3
3
import android.content.Context
4
- import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
5
4
import androidx.benchmark.macro.junit4.BaselineProfileRule
6
5
import androidx.test.core.app.ApplicationProvider
7
6
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -21,7 +20,6 @@ import org.junit.runner.RunWith
21
20
* This test actually generates the profiles.
22
21
*/
23
22
@RunWith(AndroidJUnit4 ::class )
24
- @OptIn(ExperimentalBaselineProfilesApi ::class )
25
23
class DungeonGatherBaselineProfile {
26
24
27
25
@get:Rule val baselineProfileRule: BaselineProfileRule = BaselineProfileRule ()
@@ -37,7 +35,7 @@ class DungeonGatherBaselineProfile {
37
35
38
36
@Test
39
37
fun baselineProfiles () {
40
- baselineProfileRule.collectBaselineProfile (
38
+ baselineProfileRule.collect (
41
39
packageName = PACKAGE_NAME ,
42
40
) {
43
41
pressHome()
@@ -67,6 +65,6 @@ class DungeonGatherBaselineProfile {
67
65
}
68
66
69
67
const val PACKAGE_NAME : String = " com.squareup.sample.dungeon"
70
- const val UI_TIMEOUT_MS : Long = 2000L
68
+ private const val UI_TIMEOUT_MS : Long = 2000L
71
69
}
72
70
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ android {
25
25
}
26
26
27
27
defaultConfig {
28
- minSdk = 26
28
+ minSdk = 28
29
29
targetSdk = libsCatalog.version(" targetSdk" ).toInt()
30
30
31
31
testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change 1
1
package com.squareup.benchmarks.performance.complex.poetry.benchmark
2
2
3
3
import android.content.Context
4
- import androidx.benchmark.macro.ExperimentalBaselineProfilesApi
5
4
import androidx.benchmark.macro.junit4.BaselineProfileRule
6
5
import androidx.test.core.app.ApplicationProvider
7
6
import androidx.test.platform.app.InstrumentationRegistry
@@ -19,7 +18,6 @@ import kotlin.time.ExperimentalTime
19
18
*
20
19
* You will need root access to a physical device to gather the baseline profile.
21
20
*/
22
- @ExperimentalBaselineProfilesApi
23
21
class ComplexPoetryGatherBaseline {
24
22
@get:Rule val baselineProfileRule: BaselineProfileRule = BaselineProfileRule ()
25
23
@@ -33,8 +31,8 @@ class ComplexPoetryGatherBaseline {
33
31
}
34
32
35
33
@Test
36
- @OptIn( ExperimentalTime :: class ) fun baselineProfiles () {
37
- baselineProfileRule.collectBaselineProfile (
34
+ fun baselineProfiles () {
35
+ baselineProfileRule.collect (
38
36
packageName = PACKAGE_NAME ,
39
37
) {
40
38
pressHome()
You can’t perform that action at this time.
0 commit comments