Benchmark module template manual test
Simple Java test
Create a new basic Java project with an Empty Activity
Right-click your project or module and select New > Module.
Select benchmark module and click next.

Expected results
- A configure module dialog should pop up.
- It should have the default language set to Java.
- The minApi dropdown should not offer options below the minimum supported api level, 14.
Enter a module name, a minApi, choose Java as the language and click finish.
Expected results
- A new module is created with the correct name, min api and latest compile / target api set.
- It should not add kotlin to the project.
- It should include proguard rules which are enabled by default in the module's
build.gradle
. - It should include an AndroidManifest which turns off debuggability during android tests.
- It should be configured to use the AndroidBenchmarkRunner when running instrumented tests.
- It should have the androidx.benchmark plugin applied.
Run the sample benchmark under androidTest
named ExampleBenchmark.java
Expected results
- The sample benchmark should run without any additional configuration as an instrumented test and report results similar to the image below.

Simple Kotlin test
Create a new basic Kotlin project with an Empty Activity
Right-click your project or module and select New > Module.
Select benchmark module and click next.

Expected results
- A configure module dialog should pop up.
- It should have the default language set to Kotlin.
- The minApi dropdown should not offer options below the minimum supported api level, 14.
Enter a module name, a minApi, choose Kotlin as the language and click finish.
Expected results
- A new module is created with the correct name, min api and latest compile / target api set.
- It should include proguard rules which are enabled by default in the module's
build.gradle
. - It should include an AndroidManifest which turns off debuggability during android tests.
- It should be configured to use the AndroidBenchmarkRunner when running instrumented tests.
- It should have the androidx.benchmark plugin applied.
Run the sample benchmark under androidTest
named ExampleBenchmark.kt
Expected results
- The sample benchmark should run without any additional configuration as an instrumented test and report results similar to the image below.

Simple Java project with Kotlin test
Create a new basic Java project with an Empty Activity
Right-click your project or module and select New > Module.
Select benchmark module and click next.

Expected results
- A configure module dialog should pop up.
- It should have the default language set to Java.
- The minApi dropdown should not offer options below the minimum supported api level, 14.
Enter a module name, a minApi, choose Kotlin as the language and click finish.
Expected results
- A new module is created with the correct name, min api and latest compile / target api set.
- It should add kotlin to the project.
- It should include proguard rules which are enabled by default in the module's
build.gradle
. - It should include an AndroidManifest which turns off debuggability during android tests.
- It should be configured to use the AndroidBenchmarkRunner when running instrumented tests.
- It should have the androidx.benchmark plugin applied.
Run the sample benchmark under androidTest
named ExampleBenchmark.kt
Expected results
- The sample benchmark should run without any additional configuration as an instrumented test and report results similar to the image below.

Helpful Links
https://developer.android.com/studio/profile/benchmark