A collection of samples using the performance libraries.
You can learn more about Android Performance at https://d.android.com/performance.
This sample shows how to use the Macrobenchmark library for testing application startup and runtime
performance cases, such as scrolling a RecyclerView
or LazyColumn
to measure jank.
Baseline Profiles can be generated with the Macrobenchmark library. This sample contains code to generate a baseline profile.
The sample also includes a GitHub workflow to run Macrobenchmarks on Firebase Test Lab. For more information refer to the README.md.
The Macrobenchmark sample also demonstrates using Jetpack Compose with Macrobenchmark.
This sample shows how to use the Benchmark library to benchmark code and UI from library modules.
- Make sure your device's screen is on before running benchmarks
This sample shows how to set up and use the JankStats library to detect janky frames.
You can report an Issue with a sample using this repository. If you find an issue with a specific library, report it using the corresponding issue tracker link available in the sample README file.
- Example of benchmarking an androidx.paging backed RecyclerView
- Example of benchmarking asynchronously scheduled background work