Overview of the Microbenchmark Sample
mainThis sample project demonstrates how to use the Jetpack Microbenchmark library. It provides several benchmark examples to illustrate different performance measurement scenarios:
- AutoBoxingBenchmark: Measures the cost of allocating
Integer()objects. - BitmapBenchmark: Measures the cost of accessing Bitmap pixels, demonstrating JNI call overhead.
- SortingBenchmarks: Demonstrates working with random data and using
runWithTimingDisabledsections to measure different sorting algorithms. - RecyclerViewBenchmark: A complex UI benchmark measuring the cost of scrolling a
RecyclerView.