Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit d5f18e1bc38f44a144b9a08fe6672a316a0b1eca
Author: Chris Craik <ccraik@google.com>
Date: Mon Apr 25 07:58:30 2022
Add rule filtering to benchmark
Fixes: 230371561
Test: ./gradlew compose:integration-tests:macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile # skipped all macrobenchmarks
Test: ./gradlew compose:integration-tests:macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=Macrobenchmark # ran macrobenchmarks
Relnote: """
Added `androidx.benchmark.enabledRules` instrumentation argument to
enable filtering macrobenchmark runs to just benchmarks, or just
baseline profile generation. Pass in 'Macrobenchmark', or
'BaselineProfile' to just run one type of test, e.g. when just
generating BaselineProfiles on an emulator. Comma-separated list also
supported.
E.g. in Your macrobenchmark's build.gradle:
```
android {
defaultConfig {
testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'
}
}
```
Or from the Gradle command line:
```
./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
```
"""
Change-Id: I756b7695adba25f31ca31a6408b14c8aeedfdf6a
M benchmark/benchmark-macro-junit4/src/main/java/androidx/benchmark/macro/junit4/BaselineProfileRule.kt
M benchmark/benchmark-macro-junit4/src/main/java/androidx/benchmark/macro/junit4/MacrobenchmarkRule.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/BenchmarkRule.kt
https://android-review.googlesource.com/2075365
Branch: androidx-main
commit d5f18e1bc38f44a144b9a08fe6672a316a0b1eca
Author: Chris Craik <ccraik@google.com>
Date: Mon Apr 25 07:58:30 2022
Add rule filtering to benchmark
Fixes: 230371561
Test: ./gradlew compose:integration-tests:macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile # skipped all macrobenchmarks
Test: ./gradlew compose:integration-tests:macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=Macrobenchmark # ran macrobenchmarks
Relnote: """
Added `androidx.benchmark.enabledRules` instrumentation argument to
enable filtering macrobenchmark runs to just benchmarks, or just
baseline profile generation. Pass in 'Macrobenchmark', or
'BaselineProfile' to just run one type of test, e.g. when just
generating BaselineProfiles on an emulator. Comma-separated list also
supported.
E.g. in Your macrobenchmark's build.gradle:
```
android {
defaultConfig {
testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'
}
}
```
Or from the Gradle command line:
```
./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
```
"""
Change-Id: I756b7695adba25f31ca31a6408b14c8aeedfdf6a
M benchmark/benchmark-macro-junit4/src/main/java/androidx/benchmark/macro/junit4/BaselineProfileRule.kt
M benchmark/benchmark-macro-junit4/src/main/java/androidx/benchmark/macro/junit4/MacrobenchmarkRule.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Arguments.kt
M benchmark/benchmark-junit4/src/main/java/androidx/benchmark/junit4/BenchmarkRule.kt
Description
Have library use assumeTrue to filter runs to just profiles or benchmarks. Useful in creating custom task for regenerating baseline profiles.