android/performance-samples

Samples to show APIs and best practices in Performance on Android

Kotlin

1,443

663 commits

updated Oct 14, 2026

See the code

README

Android Performance

A collection of samples using the performance libraries.

You can learn more about Android Performance at https://d.android.com/performance.

Macrobenchmark sample

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.

Microbenchmark sample

This sample shows how to use the Benchmark library to benchmark code and UI from library modules.

Important Notes

  • Make sure your device's screen is on before running benchmarks

JankStats sample

This sample shows how to set up and use the JankStats library to detect janky frames.

Reporting Issues

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.

Additional Resources

PagingWithNetworkSample

  • Example of benchmarking an androidx.paging backed RecyclerView

WorkManagerSample

  • Example of benchmarking asynchronously scheduled background work
android
performance
sample
samples

android/performance-samples

Samples to show APIs and best practices in Performance on Android

Kotlin

1,443

663 commits

updated Oct 14, 2026

See the code

README

Android Performance

A collection of samples using the performance libraries.

You can learn more about Android Performance at https://d.android.com/performance.

Macrobenchmark sample

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.

Microbenchmark sample

This sample shows how to use the Benchmark library to benchmark code and UI from library modules.

Important Notes

  • Make sure your device's screen is on before running benchmarks

JankStats sample

This sample shows how to set up and use the JankStats library to detect janky frames.

Reporting Issues

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.

Additional Resources

PagingWithNetworkSample

  • Example of benchmarking an androidx.paging backed RecyclerView

WorkManagerSample

  • Example of benchmarking asynchronously scheduled background work
android
performance
sample
samples

Project health

Overall

4.3/10

Maintained

10/10

Code review

1/10
OpenSSF Scorecard

Significant stargazers

Roman Zavarnitsyn

123 followers · starred Jan 2022

Iñaki Villar

290 followers · starred May 2019

Fredia Huya-Kouadio

168 followers · starred Jul 2021

Markus Hintersteiner

342 followers · starred Sep 2025