You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 36ed224bac
Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
1 year ago
..
libs Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
src/benchmarks Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
src_androidx/libcore/benchmark Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
Android.bp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
AndroidManifest.xml Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
AndroidTest.xml Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
README.md Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago

README.md

Run Caliper benchmark tests using vogar on a rooted device

  • It uses the Caliper library developed by Google.
  • Vogar source codes can be found at external/vogar.
  1. Preparation
# vogar requires com.android.art.testing
m vogar com.android.art.testing
# remount if you haven't done so.
adb root && adb remount && adb reboot && adb wait-for-device root
cd libcore/benchmarks/src

Extra options to reduce noise:

adb shell stop # to kill frameworks and zygote
  1. Run an individual test
vogar --benchmark benchmarks/regression/ScannerBenchmark.java

The source code of the tests can be found at src/benchmarks/

Run Jetpack benchmark tests

Docs about Jetpack Benchmark can be found at https://developer.android.com/studio/profile/benchmarking-overview

  1. Preparation

To lock CPU clocks on a rooted device, run the script provided at https://developer.android.com/studio/profile/run-benchmarks-in-ci#clock-locking.

  1. Run an individual test
atest LibcoreBenchmarkTests:libcore.benchmark.FormatterTest#stringFormatNumber_allLocales

The source code of the tests can be found at src_androidx/libcore/benchmark/

Outdated documentation / Not working

###VM Options

The VM's configuration will have a substantial impact on performance. Use Caliper's -J <value 1>,<value 2>,<value 3> syntax to compare different VM options. For example:

vogar --benchmark ~/svn/dalvik/benchmarks/regression/CrespoFileIoRegressionBenchmark.java \
-- -Jgc -Xgc:noconcurrent,-Xgc:concurrent -Jint -Xint:fast,-Xint:jit,-Xint:portable