Skip to content

Commit d91c308

Browse files
committed
Add readme information on composition tracing
1 parent 4f0bff6 commit d91c308

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

MacrobenchmarkSample/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ Alternatively, run the benchmarks from terminal with:
3838
./gradlew macrobenchmark:cC
3939
```
4040

41+
### Macrobenchmark with Composition Tracing
42+
Composition Tracing allows to run system tracing with information on when all Composables (re)compose.
43+
This gives you insights on where the UI spends majority of the time and helps you find jank.
44+
45+
To set up composition tracing for your app, follow our [documentation](https://developer.android.com/jetpack/compose/tooling/tracing).
46+
To get composition tracing when running a macrobenchmark, you also need to use `androidx.benchmark.perfettoSdkTracing.enable=true` instrumentation argument.
47+
48+
You can check the `Scroll List With Composition Tracing` run configuration that is part of the project,
49+
which runs the scroll compose list benchmark while also recording the information on composition.
50+
51+
![System trace with composition tracing](media/composition-tracing.png)
52+
4153
### Reporting Issues
4254

4355
You can report an [Issue with the sample](https://github.com/googlesamples/android-performance/issues) using this repository. If you find an issue with the Macrobenchmark library, report it using the [Issue Tracker](https://issuetracker.google.com/issues/new?component=975669&template=1519452).
516 KB
Loading

0 commit comments

Comments
 (0)