Files
frameworks_base/core/tests/benchmarks
Riddle Hsu b293d933e0 Optimize the Parcel read/write of common window data
The Parcel read/write speed of MergedConfiguration/InsetsSource
becomes 4x+ faster.

Because writeParcelable sends additional type info which is
unnecessary if the type is known on the reading side, replace
the usages to writeTypedObject and well-written readFromParcel.
That saves the time of class lookup and object creation.

Bug: 181025587
Test: vogar --mode app_process --benchmark \
frameworks/base/core/tests/benchmarks/src/android/os/ParcelableBenchmark.java

Change-Id: I29548ce6c2e5886f0e90a5dc70d8e9ecc0fb25a8
2021-02-24 23:33:16 +08:00
..

These benchmarks use the Caliper benchmark framework, and can be
run on a remote device using Vogar:

http://code.google.com/p/caliper/
http://code.google.com/p/vogar/

-------------------------

Quick Command Line Reference:

# Build vogar and dependencies.
$> mmma -j32 external/vogar

# First make sure art has permissions to dalvik-cache, otherwise it will run slower with interpreter.
$> adb root

# Run vogar in benchmark mode, telling it to use app_process (not dalvikvm which is default)
# Otherwise you will likely crash with UnsatisfiedLinkError despite having correct JNI code.

$> vogar --mode app_process --benchmark path/to/Benchmark.java

# Sometimes your benchmarks might time out, if so increase the timeout:
# (--timeout goes to vogar, and --time-limit goes to caliper)
$> vogar --timeout 1000 --mode app_process --benchmark path/to/Benchmark -- --time-limit 9999s