external/vogar
.# 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
vogar --benchmark benchmarks/regression/ScannerBenchmark.java
The source code of the tests can be found at src/benchmarks/
Docs about Jetpack Benchmark can be found at https://developer.android.com/studio/profile/benchmarking-overview
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.
atest LibcoreBenchmarkTests:libcore.benchmark.FormatterTest#stringFormatNumber_allLocales
The source code of the tests can be found at src_androidx/libcore/benchmark/
###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