Stay organized with collections
Save and categorize content based on your preferences.
Classes
Objects
BlackHole |
Function calls which can be used to prevent optimization of results.
|
Annotations
ExperimentalBenchmarkConfigApi |
Annotates declarations that are considered experimental within the Benchmark API, and are likely to change before becoming stable.
|
ExperimentalBenchmarkStateApi |
Annotation indicating experimental API primarily intended to allow microbenchmarks independent of the BenchmarkRule JUnit4 API.
|
ExperimentalBlackHoleApi |
Annotation indicating experimental API for preventing dead code removal from compile-time optimization passes, such as R8.
|
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 2025-05-15 UTC.
[null,null,["Last updated 2025-05-15 UTC."],[],[],null,["# androidx.benchmark\n==================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/androidx/benchmark/package-summary \"View this page in Java\")\n\nClasses\n-------\n\n|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [BenchmarkState](/reference/kotlin/androidx/benchmark/BenchmarkState) | Control object for microbenchmarking in Java. |\n| [ExperimentalConfig](/reference/kotlin/androidx/benchmark/ExperimentalConfig) | |\n| [MetricCapture](/reference/kotlin/androidx/benchmark/MetricCapture) | Microbenchmark metric. |\n| [MicrobenchmarkConfig](/reference/kotlin/androidx/benchmark/MicrobenchmarkConfig) | Experimental config object for microbenchmarks for defining custom metrics, tracing behavior, and profiling, which overrides options set in [instrumentation arguments](https://developer.android.com/topic/performance/benchmarking/microbenchmark-instrumentation-args). |\n| [MicrobenchmarkScope](/reference/kotlin/androidx/benchmark/MicrobenchmarkScope) | Scope handle for pausing/resuming microbenchmark measurement. |\n| [ProfilerConfig](/reference/kotlin/androidx/benchmark/ProfilerConfig) | Profiler configuration object. |\n| [ProfilerConfig.MethodTracing](/reference/kotlin/androidx/benchmark/ProfilerConfig.MethodTracing) | |\n| [ProfilerConfig.StackSampling](/reference/kotlin/androidx/benchmark/ProfilerConfig.StackSampling) | |\n| [StartupInsightsConfig](/reference/kotlin/androidx/benchmark/StartupInsightsConfig) | Configuration for startup insights. |\n| [TimeCapture](/reference/kotlin/androidx/benchmark/TimeCapture) | Time metric, which reports time in nanos, based on the time passed to [captureStop](/reference/kotlin/androidx/benchmark/TimeCapture#captureStop(kotlin.Long,kotlin.LongArray,kotlin.Int)). |\n\nObjects\n-------\n\n|-------------------------------------------------------------|----------------------------------------------------------------------|\n| [BlackHole](/reference/kotlin/androidx/benchmark/BlackHole) | Function calls which can be used to prevent optimization of results. |\n\nAnnotations\n-----------\n\n|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [ExperimentalBenchmarkConfigApi](/reference/kotlin/androidx/benchmark/ExperimentalBenchmarkConfigApi) | Annotates declarations that are considered experimental within the Benchmark API, and are likely to change before becoming stable. |\n| [ExperimentalBenchmarkStateApi](/reference/kotlin/androidx/benchmark/ExperimentalBenchmarkStateApi) | Annotation indicating experimental API primarily intended to allow microbenchmarks independent of the BenchmarkRule JUnit4 API. |\n| [ExperimentalBlackHoleApi](/reference/kotlin/androidx/benchmark/ExperimentalBlackHoleApi) | Annotation indicating experimental API for preventing dead code removal from compile-time optimization passes, such as R8. |"]]