Skip to content

Commit d3e7ab9

Browse files
authored
Merge pull request #751 from android/st/document-compiler-metrics-command
Added Compose compiler metrics generation command to README.md
2 parents 2939446 + 96c7ada commit d3e7ab9

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,14 @@ The app uses adaptive layouts to
132132

133133
Find out more about the [UI architecture here](docs/ArchitectureLearningJourney.md#ui-layer).
134134

135-
# Baseline profiles
135+
# Performance
136+
137+
## Benchmarks
138+
139+
Find all tests written using [`Macrobenchmark`](https://developer.android.com/topic/performance/benchmarking/macrobenchmark-overview)
140+
in the `benchmarks` module. This module also contains the test to generate the Baseline profile.
141+
142+
## Baseline profiles
136143

137144
The baseline profile for this app is located at [`app/src/main/baseline-prof.txt`](app/src/main/baseline-prof.txt).
138145
It contains rules that enable AOT compilation of the critical user path taken during app launch.
@@ -144,6 +151,19 @@ To generate the baseline profile, select the `benchmark` build variant and run t
144151
`BaselineProfileGenerator` benchmark test on an AOSP Android Emulator.
145152
Then copy the resulting baseline profile from the emulator to [`app/src/main/baseline-prof.txt`](app/src/main/baseline-prof.txt).
146153

154+
## Compose compiler metrics
155+
156+
Run the following command to get and analyse compose compiler metrics:
157+
158+
```
159+
./gradlew assembleRelease -PenableComposeCompilerMetrics=true -PenableComposeCompilerReports=true
160+
```
161+
162+
The reports files will be added to build/compose-reports in each module. The metrics files will be
163+
added to build/compose-metrics in each module.
164+
165+
For more information on Compose compiler metrics, see [this blog post](https://medium.com/androiddevelopers/jetpack-compose-stability-explained-79c10db270c8).
166+
147167
# License
148168

149169
**Now in Android** is distributed under the terms of the Apache License (Version 2.0). See the

0 commit comments

Comments
 (0)