Benchmark (original) (raw)

Skip to main content

Accurately measure your code's performance within Android Studio.

Latest Update Stable Release Release Candidate Beta Release Alpha Release
March 25, 2026 1.4.1 - - 1.5.0-alpha05

Declaring dependencies

To add a dependency on Benchmark, you must add the Google Maven repository to your project. ReadGoogle's Maven repository for more information.

Macrobenchmark

To use Macrobenchmarkin your project, add the following dependencies to your build.gradle file for yourmacrobenchmark module:

Groovy

dependencies { androidTestImplementation "androidx.benchmark:benchmark-macro-junit4:1.4.1" }

Kotlin

dependencies { androidTestImplementation("androidx.benchmark:benchmark-macro-junit4:1.4.1") }

Microbenchmark

To use Microbenchmarkin your project, add the following dependencies to your build.gradle file for yourmicrobenchmark module:

Groovy

dependencies { androidTestImplementation "androidx.benchmark:benchmark-junit4:1.4.1" }

android { ... defaultConfig { ... testInstrumentationRunner "androidx.benchmark.junit4.AndroidBenchmarkRunner" } }

Kotlin

dependencies { androidTestImplementation("androidx.benchmark:benchmark-junit4:1.4.1") }

android { ... defaultConfig { ... testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner" } }

The Microbenchmark library also provides a Gradle plugin to use with your microbenchmark module. This plugin sets build configuration defaults for the module, sets upbenchmark output copy to the host, and provides the ./gradlew lockClocks task.

To use the plugin, include the following line in the `plugins` block in your top-levelbuild.gradle file:

Groovy

plugins { id 'androidx.benchmark' version '1.4.1' apply false }

Kotlin

plugins { id("androidx.benchmark") version "1.4.1" apply false }

Then apply the plugin to your benchmark module's build.gradle file

Groovy

plugins { id 'androidx.benchmark' }

Kotlin

plugins { id("androidx.benchmark") }

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at theexisting issuesin this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentationfor more information.

Version 1.5

Version 1.5.0-alpha05

March 25, 2026

androidx.benchmark:benchmark-*:1.5.0-alpha05 is released. Version 1.5.0-alpha05 contains these commits.

Bug Fixes

New Features- Added a new instrumentation argument androidx.benchmark.requireLockedClocks that allows enabling a check for whether the CPU clocks are locked for rooted devices. (Id82e8, b/468039042)

Version 1.5.0-alpha04

March 11, 2026

androidx.benchmark:benchmark-*:1.5.0-alpha04 is released. Version 1.5.0-alpha04 contains these commits.

API Changes

Bug Fixes

Version 1.5.0-alpha03

February 11, 2026

androidx.benchmark:benchmark-*:1.5.0-alpha03 is released. Version 1.5.0-alpha03 contains these commits.

Version 1.5.0-alpha02

January 28, 2026

androidx.benchmark:benchmark-*:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits.

Bug Fixes

kotlin {  
  androidLibrary {  
    namespace = "com.example.namespace"  
    compileSdk = 36  
  }  
  sourceSets {  
    androidMain.dependencies {  
      // THIS DOES NOT WORK  
      // baselineProfile(":yourProducerProject")  
    }  
  }  
}  
plugins {  
    id("org.jetbrains.kotlin.multiplatform")  
    id("com.android.kotlin.multiplatform.library")  
    id("androidx.baselineprofile.consumer")  
}  
kotlin {  
  androidLibrary {  
    namespace = "com.example.namespace"  
    compileSdk = 36  
  }  
  sourceSets {  
    androidMain.dependencies {  
      // ...  
    }  
  }  
}  
// Define dependencies  
// This works !  
baselineProfile {  
  variants {  
    androidMain {  
      from(project(":yourProducerProject"))  
    }  
  }  
}  

Version 1.5.0-alpha01

December 17, 2025

androidx.benchmark:benchmark-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits.

New Features

API Changes

Version 1.4

Version 1.4.1

September 10, 2025

androidx.benchmark:benchmark-*:1.4.1 is released. Version 1.4.1 contains these commits.

Bug Fixes

Version 1.4.0

July 30, 2025

androidx.benchmark:benchmark-*:1.4.0 is released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

Microbenchmark

Macrobenchmark

Baseline Profiles

Other Changes

Version 1.4.0-rc01

June 18, 2025

androidx.benchmark:benchmark-*:1.4.0-rc01 is released. Version 1.4.0-rc01 contains these commits.

Bug Fixes

Version 1.4.0-beta02

June 4, 2025

androidx.benchmark:benchmark-*:1.4.0-beta02 is released. Version 1.4.0-beta02 contains these commits.

API Changes

Version 1.4.0-beta01

May 7, 2025

androidx.benchmark:benchmark-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits.

API Changes

Bug Fixes

External Contribution

Version 1.4.0-alpha11

April 9, 2025

androidx.benchmark:benchmark-*:1.4.0-alpha11 is released. Version 1.4.0-alpha11 contains these commits.

API Changes

Bug Fixes

Dependency Updates

Version 1.4.0-alpha10

March 26, 2025

androidx.benchmark:benchmark-*:1.4.0-alpha10 is released. Version 1.4.0-alpha10 contains these commits.

API Changes

Bug Fixes

Version 1.4.0-alpha09

March 12, 2025

androidx.benchmark:benchmark-*:1.4.0-alpha09 is released. Version 1.4.0-alpha09 contains these commits.

API Changes

Bug Fixes

Version 1.4.0-alpha08

February 12, 2025

androidx.benchmark:benchmark-*:1.4.0-alpha08 is released. Version 1.4.0-alpha08 contains these commits.

API Changes

Bug Fixes

Version 1.4.0-alpha07

January 29, 2025

androidx.benchmark:benchmark-*:1.4.0-alpha07 is released. Version 1.4.0-alpha07 contains these commits.

New Features

API Changes

Bug Fixes

Version 1.4.0-alpha06

December 11, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha06 is released. Version 1.4.0-alpha06 contains these commits.

API Changes

Bug Fixes

Version 1.4.0-alpha05

November 13, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits.

Bug Fixes

Version 1.4.0-alpha04

October 30, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha04 is released. Version 1.4.0-alpha04 contains these commits.

New Features

Bug Fixes

Version 1.4.0-alpha03

October 16, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.

API Changes

Bug Fixes

Version 1.4.0-alpha02

October 2, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.

API Changes

Bug Fixes

To use FTL apply the plugin to the baseline profile module in the plugin block, with:

  plugins {
      ...
      id("com.google.firebase.testlab")
  }

and then configure firebase test lab with:

  firebaseTestLab {

      // Credentials for FTL service
      serviceAccountCredentials.set(file("credentials.json"))

      // Creates one or more managed devices to run the tests on.
      managedDevices {
          "ftlDeviceShiba34" {
              device = "shiba"
              apiLevel = 34
          }
      }

      // Ensures the baseline profile is pulled from the device.
      // Note that this will be automated as well later with aosp/3272935.
      testOptions {
          results {
              directoriesToPull.addAll("/storage/emulated/0/Android/media/${android.namespace}")
          }
      }
  }

Also the created FTL device needs to be added to the baseline profile extension:

  baselineProfile {
      managedDevices += "ftlDeviceShiba34"
      useConnectedDevices = false
  }

Version 1.4.0-alpha01

September 18, 2024

androidx.benchmark:benchmark-*:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.

New Feature - App Startup Insights

To enable in a startup benchmark:

  @Test
  fun startup {
      macrobenchmarkRule.measureRepeated(
          …
          packageName = "com.example.my.application.id"
          metrics = listOf(StartupTimingMetric()),
          iterations = 5,
          startupMode = StartupMode.COLD,
          compilationMode = CompilationMode.None(),
          experimentalConfig = ExperimentalConfig(startupInsightsConfig = StartupInsightsConfig(isEnabled = true))
          ) {
          scope.startActivityAndWait(...)
      }
  }

Then running your startup benchmark will analyze the trace to look for common problems, and print them after metrics to Studio test output in the benchmark tab, e.g.:

StartupBenchmark_startup[startup=COLD,compilationMode=None]
├── Metrics
│   ├──   timeToFullDisplayMs                min  1,147.2,   median  1,208.8,   max  1,307.4
│   └──   timeToInitialDisplayMs             min  1,147.2,   median  1,208.8,   max  1,307.4
├── App Startup Insights
│   ├── App in debuggable mode (expected: false)
│   │   └── seen in iterations: 0(true) 1(true) 2(true) 3(true) 4(true) 5(true) 6(true) 7(true) 8(true) 9(true)
│   ├── Potential CPU contention with another process (expected: < 100000000ns)
│   │   └── seen in iterations: 4(105022546ns)
│   └── Main Thread - Binder transactions blocked (expected: false)
│       └── seen in iterations: 7(true)
└── Traces
    └── Iteration 0 1 2 3 4 5 6 7 8 9

This feature is still a work-in-progress, with improvements to documentation and extensibility to follow, but feedback is welcome.

New Features

API Changes

Bug Fixes

Version 1.3

Version 1.3.4

March 26, 2025

androidx.benchmark:benchmark-*:1.3.4 is released. Version 1.3.4 contains these commits.

Bug Fixes

Version 1.3.3

October 16, 2024

androidx.benchmark:benchmark-*:1.3.3 is released. Version 1.3.3 contains these commits.

Bug Fixes

Version 1.3.2

October 2, 2024

androidx.benchmark:benchmark-*:1.3.2 is released. Version 1.3.2 contains these commits.

Bug Fixes

To use FTL apply the plugin to the baseline profile module in the plugin block, with:

  plugins {
      ...
      id("com.google.firebase.testlab")
  }

and then configure firebase test lab with:

  firebaseTestLab {

      // Credentials for FTL service
      serviceAccountCredentials.set(file("credentials.json"))

      // Creates one or more managed devices to run the tests on.
      managedDevices {
          "ftlDeviceShiba34" {
              device = "shiba"
              apiLevel = 34
          }
      }

      // Ensures the baseline profile is pulled from the device.
      // Note that this will be automated as well later with aosp/3272935.
      testOptions {
          results {
              directoriesToPull.addAll("/storage/emulated/0/Android/media/${android.namespace}")
          }
      }
  }

Also the created FTL device needs to be added to the baseline profile extension:

  baselineProfile {
      managedDevices += "ftlDeviceShiba34"
      useConnectedDevices = false
  }

Version 1.3.1

September 18, 2024

androidx.benchmark:benchmark-*:1.3.1 is released. Version 1.3.1 contains these commits.

Bug Fixes

Version 1.3.0

August 21, 2024

androidx.benchmark:benchmark-*:1.3.0 is released. Version 1.3.0 contains these commits.

Microbenchmark changes since 1.2.0

MACRObenchmark changes since 1.2.0

Baseline Profile capture / Gradle plugin changes since 1.2.0

Other significant changes since 1.2.0

Version 1.3.0-rc01

August 7, 2024

androidx.benchmark:benchmark-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.

Bug Fixes

Version 1.3.0-beta02

July 10, 2024

androidx.benchmark:benchmark-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits.

Bug Fixes

Version 1.3.0-beta01

June 12, 2024

androidx.benchmark:benchmark-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.

API Changes

Bug Fixes

Version 1.3.0-alpha05

May 14, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha05 is released. Version 1.3.0-alpha05 contains these commits.

Bug Fixes

Version 1.3.0-alpha04

May 1, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha04 is released. Version 1.3.0-alpha04 contains these commits.

API Changes

Bug Fixes

Version 1.3.0-alpha03

April 17, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.

New Features

API Changes

Bug Fixes

Version 1.3.0-alpha02

March 20, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.

New Features

android {  
    buildTypes.release.androidTest.enableMinification = true  
}  

Bug Fixes

Version 1.3.0-alpha01

February 21, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

API Changes

Bug Fixes

Version 1.2

Version 1.2.4

April 17, 2024

androidx.benchmark:benchmark-*:1.2.4 is released. Version 1.2.4 contains these commits.

Bug Fixes

Version 1.2.3

January 24, 2024

androidx.benchmark:benchmark-*:1.2.3 is released. Version 1.2.3 contains these commits.

Bug Fixes

Version 1.2.2

December 1, 2023

androidx.benchmark:benchmark-*:1.2.2 is released. Version 1.2.2 contains these commits.

Baseline Profiles

Version 1.2.1

November 15, 2023

androidx.benchmark:benchmark-*:1.2.1 is released. Version 1.2.1 contains these commits.

New Features

Version 1.2.0

October 18, 2023

androidx.benchmark:benchmark-*:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

Baseline Profiles

Macrobenchmark

Microbenchmark

Version 1.2.0-rc02

October 6, 2023

androidx.benchmark:benchmark-*:1.2.0-rc02 is released. Version 1.2.0-rc02 contains these commits.

Bug Fixes

Version 1.2.0-rc01

September 20, 2023

androidx.benchmark:benchmark-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.

Bug Fixes

Version 1.2.0-beta05

August 30, 2023

androidx.benchmark:benchmark-*:1.2.0-beta05 is released. Version 1.2.0-beta05 contains these commits.

New Features

Version 1.2.0-beta04

August 23, 2023

androidx.benchmark:benchmark-*:1.2.0-beta04 is released. Version 1.2.0-beta04 contains these commits.

New Features

Bug Fixes

Version 1.2.0-beta03

August 9, 2023

androidx.benchmark:benchmark-*:1.2.0-beta03 is released. Version 1.2.0-beta03 contains these commits.

API Changes

Bug Fixes

Version 1.2.0-beta02

July 26, 2023

androidx.benchmark:benchmark-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.

API Changes

Bug Fixes

Version 1.2.0-beta01

July 18, 2023

androidx.benchmark:benchmark-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

Bug Fixes

Version 1.2.0-alpha16

June 21, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha16 is released. Version 1.2.0-alpha16 contains these commits.

API Changes

Bug Fixes

Version 1.2.0-alpha15

June 7, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha15 is released. Version 1.2.0-alpha15 contains these commits.

New Features

API Changes

Bug Fixes

Version 1.2.0-alpha14

May 3, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha14 is released. Version 1.2.0-alpha14 contains these commits.

Bug Fixes

Version 1.2.0-alpha13

April 5, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha13 is released. Version 1.2.0-alpha13 contains these commits.

API Changes

Version 1.2.0-alpha12

March 22, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha12 is released. Version 1.2.0-alpha12 contains these commits.

New Features

API Changes

Version 1.2.0-alpha11

March 8, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha11 is released. Version 1.2.0-alpha11 contains these commits.

Bug Fixes

Version 1.2.0-alpha10

February 22, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha10 is released. Version 1.2.0-alpha10 contains these commits.

New Features

Bug Fixes

Version 1.2.0-alpha09

January 11, 2023

androidx.benchmark:benchmark-*:1.2.0-alpha09 is released. Version 1.2.0-alpha09 contains these commits.

Bug Fixes

Version 1.2.0-alpha08

December 7, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.

API Changes

Bug Fixes

Known Issues- MacrobenchmarkScope.dropShaderCache() may crash due to a missing broadcast registry in profileinstaller manifest, which has not yet been released. (I5c728, b/258619948) To workaround the issue in profileinstaller:1.3.0-alpha02, add the following to your application's (not your benchmark's) AndroidManifest.xml:

  <!-- workaround bug in profileinstaller 1.3.0-alpha02, remove when updating to alpha03+ -->
  <receiver
    android:name="androidx.profileinstaller.ProfileInstallReceiver"
    android:permission="android.permission.DUMP"
    android:exported="true">
    <intent-filter>
        <action android:name="androidx.profileinstaller.action.BENCHMARK_OPERATION" />
    </intent-filter>
  </receiver>

Version 1.2.0-alpha07

November 9, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha07 is released. Version 1.2.0-alpha07 contains these commits.

API Changes

Bug Fixes

Version 1.2.0-alpha06

October 24, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.

API Changes

Bug Fixes

Version 1.2.0-alpha05

October 5, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.

Bug Fixes

Version 1.2.0-alpha04

September 21, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.

New Features

./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.dryRunMode.enable=true  

In build.gradle:

android {  
    defaultConfig {  
        testInstrumentationRunnerArgument 'androidx.benchmark.dryRunMode.enable', 'true'  
    }  
}  

Bug Fixes

Version 1.2.0-alpha03

September 7, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.

New Features

Bug Fixes

Version 1.2.0-alpha02

August 24, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.

API Changes

Bug Fixes

Version 1.2.0-alpha01

July 27, 2022

androidx.benchmark:benchmark-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

New Features

android {  
    defaultConfig {  
        testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'  
    }  
}  

Or from the Gradle command line:

./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile  

API Changes

Bug Fixes

Version 1.1.1

Version 1.1.1

November 9, 2022

androidx.benchmark:benchmark-*:1.1.1 is released. Version 1.1.1 contains these commits.

Bug Fixes

Version 1.1.0

Version 1.1.0

June 15, 2022

androidx.benchmark:benchmark-*:1.1.0 is released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

Version 1.1.0-rc03

June 1, 2022

androidx.benchmark:benchmark-*:1.1.0-rc03 is released. Version 1.1.0-rc03 contains these commits.

Bug Fixes

Version 1.1.0-rc02

May 11, 2022

androidx.benchmark:benchmark-*:1.1.0-rc02 is released. Version 1.1.0-rc02 contains these commits.

Bug Fixes/Behavior Changes

android {  
    defaultConfig {  
        testInstrumentationRunnerArgument 'androidx.benchmark.compilation.enabled, 'false'  
    }  
}  

Or from the Gradle command line:

./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.compilation.enabled=false  
android {  
    defaultConfig {  
        testInstrumentationRunnerArgument 'androidx.benchmark.enabledRules', 'BaselineProfile'  
    }  
}  

Or from the Gradle command line:

./gradlew macrobenchmark:cC -P android.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile  

Version 1.1.0-rc01

April 20, 2022

androidx.benchmark:benchmark-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.

Bug Fixes

Version 1.1.0-beta06

April 6, 2022

androidx.benchmark:benchmark-*:1.1.0-beta06 is released. Version 1.1.0-beta06 contains these commits.

Bug Fixes

Version 1.1.0-beta05

March 23, 2022

androidx.benchmark:benchmark-*:1.1.0-beta05 is released. Version 1.1.0-beta05 contains these commits.

Bug Fixes

Version 1.1.0-beta04

February 23, 2022

androidx.benchmark:benchmark-*:1.1.0-beta04 is released. Version 1.1.0-beta04 contains these commits.

Bug Fixes

Version 1.1.0-beta03

February 9, 2022

androidx.benchmark:benchmark-*:1.1.0-beta03 is released. Version 1.1.0-beta03 contains these commits.

API Changes

@Test  
fun collectBaselineProfile() {  
    baselineRule.collectBaselineProfile(  
        packageName = PACKAGE_NAME,  
        setupBlock = {  
            startActivityAndWait()  
        },  
        profileBlock = {  
            // ...  
        }  
    )  
}  
@Test  
fun collectBaselineProfile() {  
    baselineRule.collectBaselineProfile(  
        packageName = PACKAGE_NAME,  
        profileBlock = {  
            startActivityAndWait()  
            // ...  
        }  
    )  
}  

Bug Fixes

Version 1.1.0-beta02

January 26, 2022

androidx.benchmark:benchmark-*:1.1.0-beta02 is released. Version 1.1.0-beta02 contains these commits.

Bug Fixes

Version 1.1.0-beta01

January 12, 2022

androidx.benchmark:benchmark-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

Bug Fixes

Version 1.1.0-alpha13

December 15, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha13 is released. Version 1.1.0-alpha13 contains these commits.

API Changes

Bug Fixes

Version 1.1.0-alpha12

November 17, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha12 is released. Version 1.1.0-alpha12 contains these commits.

New Features

Bug Fixes

Version 1.1.0-alpha11

November 3, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha11 is released. Version 1.1.0-alpha11 contains these commits.

API Changes

Version 1.1.0-alpha10

October 27, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha10 is released. Version 1.1.0-alpha10 contains these commits.

API Changes

Bug Fixes

Version 1.1.0-alpha09

October 13, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha09 is released. Version 1.1.0-alpha09 contains these commits.

Bug Fixes

Version 1.1.0-alpha08

September 29, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha08 is released. Version 1.1.0-alpha08 contains these commits.

API Changes

Version 1.1.0-alpha07

September 1, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha07 is released. Version 1.1.0-alpha07 contains these commits.

API Changes

Bug Fixes

Version 1.1.0-alpha06

August 18, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha06 is released. Version 1.1.0-alpha06 contains these commits.

API Changes

Bug Fixes

Known Issues

Version 1.1.0-alpha05

August 4, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits.

1.1.0-alpha04 was cancelled before release due to a sporatic crash. b/193827052

API Changes

Bug Fixes

Version 1.1.0-alpha03

June 16, 2021

androidx.benchmark:benchmark-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.

New Features

Bug Fixes

testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "EMULATOR,LOW-BATTERY"  

Version 1.1.0-alpha02

May 18, 2021

Benchmark version 1.1.0-alpha02 brings a big component to benchmarking - Macrobenchmark. In addition to benchmark allowing you to measure CPU loops, macrobenchmark allows you to measure whole-app interactions like startup and scrolling, and capture traces. For more information see the library documentation.

androidx.benchmark:benchmark-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

New Features

Macrobenchmark artifacts added (androidx.benchmark:benchmark-macro-junit4 and androidx.benchmark:benchmark-macro)

Bug Fixes

Version 1.1.0-alpha01

June 10, 2020

androidx.benchmark:benchmark-common:1.1.0-alpha01, androidx.benchmark:benchmark-gradle-plugin:1.1.0-alpha01, and androidx.benchmark:benchmark-junit4:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

New Features of 1.1

** Bug Fixes **

Known Issues

Version 1.0.0

Benchmark Version 1.0.0

November 20, 2019

androidx.benchmark:benchmark-common:1.0.0, androidx.benchmark:benchmark-gradle-plugin:1.0.0, and androidx.benchmark:benchmark-junit4:1.0.0 are released with no changes from 1.0.0-rc01. Version 1.0.0 contains these commits.

Major features of 1.0.0

The Benchmark library allows you to write performance benchmarks of app code and get results quickly.

It prevents build and runtime configuration issues and stabilizes device performance to ensure that measurements are accurate and consistent. Run the benchmarks directly in Android Studio, or in Continuous Integration to observe code performance over time, and to prevent regressions.

Major features include:

Version 1.0.0-rc01

October 23, 2019

androidx.benchmark:benchmark-common:1.0.0-rc01, androidx.benchmark:benchmark-gradle-plugin:1.0.0-rc01, and androidx.benchmark:benchmark-junit4:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

New features

Bug fixes

Version 1.0.0-beta01

October 9, 2019

androidx.benchmark:benchmark-common:1.0.0-beta01, androidx.benchmark:benchmark-gradle-plugin:1.0.0-beta01, and androidx.benchmark:benchmark-junit4:1.0.0-beta01 are released. Version 1.0.0-beta01 contains these commits.

New features

Bug fixes

Version 1.0.0-alpha06

September 18, 2019

androidx.benchmark:benchmark-common:1.0.0-alpha06, androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha06, and androidx.benchmark:benchmark-junit4:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.

New features

API changes

Version 1.0.0-alpha05

September 5, 2019

androidx.benchmark:benchmark-common:1.0.0-alpha05, androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha05, and androidx.benchmark:benchmark-junit4:1.0.0-alpha05 are released. The commits included in this version can be found here.

API changes

Bug fixes

Version 1.0.0-alpha04

August 7, 2019

androidx.benchmark:benchmark-common:1.0.0-alpha04, androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha04, and androidx.benchmark:benchmark-junit4:1.0.0-alpha04 are released. The commits included in this version can be found here.

New documentation has also been added for how to use the Benchmark library without Gradle, both for usage with different build systems (such as Bazel or Buck), and when running in CI. For more information, see Build benchmarks without Gradle and Run benchmarks in Continuous Integration.

New features

API changes

Bug fixes

External contributions

Version 1.0.0-alpha03

July 2, 2019

androidx.benchmark:benchmark:1.0.0-alpha03 and androidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha03 are released. The commits included in this version can be found here.

New features

Bug fixes

Version 1.0.0-alpha02

June 6, 2019

androidx.benchmark:1.0.0-alpha02 andandroidx.benchmark:benchmark-gradle-plugin:1.0.0-alpha02 are released. The commits included in this version can be found here.

Note that we are treating the JSON schema as an API. We plan to follow the same stability constraints as other APIs: stable (with very rare exceptions) once in beta, and fixed in final release, with only additions in minor releases and changes/removals in major releases.

API changes

Bug fixes

Version 1.0.0-alpha01

May 7, 2019

androidx.benchmark:benchmark:1.0.0-alpha01 is released. The commits included in this version are availablehere.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-03-25 UTC.