# android/performance-samples

Samples to show APIs and best practices in Performance on Android

Repository: https://github.com/android/performance-samples
Canonical: https://ross.abutalabs.com/products/performance-samples
Homepage: https://d.android.com/topic/performance/overview
Language: Kotlin
License: Apache-2.0
License Family: permissive
Topics: android, performance, samples, sample
Last push: 2026-08-25T17:38:45+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4206, "days_push": 8, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1440, forks 250 (observed 2026-08-28T04:04:44.194526+00:00)

## What it is
Official Android sample collection demonstrating performance libraries like Macrobenchmark, Microbenchmark, and JankStats. It shows best practices for measuring startup, jank, and runtime performance, including Baseline Profile generation.

## Use cases
- measure android app startup time
- detect janky frames in jetpack compose
- generate baseline profiles for android app
- benchmark android app code with microbenchmark
- run macrobenchmarks on firebase test lab
- learn android performance best practices

## When to choose
- you want official, maintained example code for Android performance libraries
- you need a starting point for Macrobenchmark or JankStats integration
- you want CI examples running benchmarks on Firebase Test Lab

## When to avoid
- you need a production-ready benchmarking framework rather than sample code
- your project is not Android/Kotlin
- you need performance monitoring for backend services

## Facets
- artifact type: learning-resource
- maturity: active
- function: benchmarking, testing
- domain: mobile-development, performance, tutorials
- platform: jvm
- tags: macrobenchmark, microbenchmark, jankstats, baseline-profiles, sample-code, jetpack-compose, android

## Member repositories
- android/performance-samples (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.194526+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:30.818823+00:00, confidence not recorded.
  - readme: https://github.com/android/performance-samples (fetched 2026-08-28T04:04:44.194526+00:00, sha e773c8371daa)
  - homepage: https://d.android.com/topic/performance/overview (fetched 2026-08-29T11:46:57.323739+00:00, sha be478b3f58c3)
  - site_page: https://developer.android.com/google/play/installreferrer (fetched 2026-08-29T11:46:57.337039+00:00, sha 0c36cc3c0414)
  - site_page: https://developer.android.com/blog/categories/documentation (fetched 2026-08-29T11:46:57.342911+00:00, sha ebdb8e262578)
  - site_page: https://developer.android.com/training/wearables/versions/latest (fetched 2026-08-29T11:46:57.332782+00:00, sha 8396b9ab4b55)
  - site_page: https://developer.android.com/jetpack/androidx/releases/compose (fetched 2026-08-29T11:46:57.334832+00:00, sha 26b81706cc72)
  - site_page: https://developer.android.com/blog/categories/product-news (fetched 2026-08-29T11:46:57.338964+00:00, sha fdad7419318d)
  - site_page: https://developer.android.com/blog/categories/community (fetched 2026-08-29T11:46:57.341072+00:00, sha 3e0edecad2d7)
  - site_page: https://developer.android.com/topic/performance/memory-overview (fetched 2026-08-29T11:46:57.344498+00:00, sha ca7a5a278086)
  - site_page: https://developer.android.com/topic/performance/inspecting-overview (fetched 2026-08-29T11:46:57.346318+00:00, sha e2c4a1ce6686)
- Data as of 2026-08-30T08:39:29.467469+00:00.
