with one click
benchmark
Benchmarking and improving the performance of Jetpack Compose. Use this skill when requested to run, analyze, or create microbenchmarks and macrobenchmarks for Compose components or features.
Menu
Benchmarking and improving the performance of Jetpack Compose. Use this skill when requested to run, analyze, or create microbenchmarks and macrobenchmarks for Compose components or features.
| name | benchmark |
| description | Benchmarking and improving the performance of Jetpack Compose. Use this skill when requested to run, analyze, or create microbenchmarks and macrobenchmarks for Compose components or features. |
This skill focuses on benchmarking and improving the performance of Compose.
Microbenchmarks measure fine-grained performance (e.g., individual component measure/layout).
<module-name>/benchmark (e.g., compose/ui/ui/benchmark).:compose:ui:ui-benchmark:connectedReleaseAndroidTest).-Pandroid.testInstrumentationRunnerArguments.tests_regex to run specific tests. This is especially useful for parameterized tests where class#method filtering might not work as expected.
./gradlew :compose:ui:ui-benchmark:connectedReleaseAndroidTest -Pandroid.testInstrumentationRunnerArguments.tests_regex=.*MyBenchmark.myMethod.*Finished 1 tests). If more tests ran than expected, refine your regex../benchmark/gradle-plugin/src/main/resources/scripts/disableJit.sh to stabilize the platform../benchmark/gradle-plugin/src/main/resources/scripts/lockClocks.sh. Make sure it is run /after/ disabling JIT.../../out/androidx/compose/<folder>/benchmark/build/outputs/connected_android_test_additional_output/.txt: Short summary..json: Full data for analysis..perfetto_trace: Detailed trace.~/trace_processor to analyze traces../benchmark/gradle-plugin/src/main/resources/scripts/resetDevice.shMacrobenchmarks measure high-level interactions (startup, scrolling) using UI Automator on a real application.
compose/integration-tests/macrobenchmark (Target app: macrobenchmark-target).compose/integration-tests/hero (More representative of real-world apps).connectedReleaseAndroidTest.-Pandroid.testInstrumentationRunnerArguments.tests_regex to run specific tests. This is especially useful for parameterized tests where class#method filtering might not work as expected.
./gradlew :compose:ui:ui-benchmark:connectedReleaseAndroidTest -Pandroid.testInstrumentationRunnerArguments.tests_regex=.*MyBenchmark.myMethod.*Finished 1 tests). If more tests ran than expected, refine your regex.timeToInitialDisplayMs, timeToFullDisplayMs.../../out/androidx/compose/<folder>/build/outputs/connected_android_test_additional_output/recompose, measure, and layout.~/trace_processor.trace("name") {
// target code block
}
Ensure KDocs are high quality, concise, active, and explicitly linked to API components.
Use this skill to find Compose feature flags introduced by a specific git user or email and map them to the library version in which they were added.
A skill for building instrumented tests in Remote Compose using GridScreenshotUI.
A skill for building instrumented screenshot tests in Remote Compose using RemoteScreenshotTestRule.
A skill for creating, amending, formatting, and uploading commits in the AndroidX frameworks/support project
Scaffold a new RemoteCompose wear material3 component with test, sample, and preview