Skip to content
Multiple samples showing the best practices in performance on Android.
HTML Other
  1. HTML 99.7%
  2. Other 0.3%
Branch: master
Clone or download
dlam Merge pull request #34 from mohand1993/master
Opt out of scoped storage (workaround android 10 compatibility)
Latest commit 5b9bab4 Nov 8, 2019

README.md

Android Performance

Benchmark samples using the shiny new Jetpack Benchmark library.

Important Notes

  • Make sure your device's screen is on before running benchmarks
  • Don't forget to checkout submodules: git submodule update --init --recursive

To run either sample: ./gradlew benchmark:cC

BenchmarkSample

This sample shows how to use the Benchmark library to benchmark code and UI from library modules.

BenchmarkNdkSample (Prototype!)

This prototype sample shows how to use the Benchmark library together with the NDK, and google/benchmark to benchmark C++ code, while getting the Android-specific performance stability, and Studio integration from the Jetpack Benchmark library.

ConstraintLayout performance comparison

This sample compares how different ViewGroups (ConstraintLayout vs traditional layouts) affect the UI performance.

Reporting Issues

You can report an Issue with a sample using this repository. If you find an issue with the Benchmark library, report it using the Android Benchmark Issue Tracker

Additional Resources

PagingWithNetworkSample - Example of benchmarking an androidx.paging backed RecyclerView

WorkManagerSample - Example of benchmarking asynchronously scheduled background work

License

Copyright 2019 The Android Open Source Project, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.