aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2016-10-20 14:19:38 -0700
committerIgor Murashkin <iam@google.com>2017-02-17 16:34:44 +0000
commit6605ea3e8b5db9863611a75e9e39a2839f1d6063 (patch)
treece50e788acbc9c1ebd435fccb90a7091338c358f
parent341c080d7bd9ca5194d520bf9c8f0b91471b71f9 (diff)
downloadvogar-o-preview.tar.gz
benchmarks: Speed up execution of caliper benchmarks by 15xandroid-o-preview-1android-n-mr2-preview-2o-preview
After: Collected 66 measurements from: 1 instrument(s) 1 virtual machine(s) 66 benchmark(s) Execution complete: 2.619 min. <---- 2.6 min benchmarks.InvokeInterface OK (SUCCESS) Before: Collected 594 measurements from: 1 instrument(s) 1 virtual machine(s) 66 benchmark(s) Execution complete: 37.64 min. <---- 37.64 min benchmarks.InvokeInterface OK (SUCCESS) Test: vogar --benchmark libcore/benchmarks/src/benchmarks/InvokeInterface.java Bug: 32313358 Change-Id: I8733db16e52d0aa2f366da8e739be2dd82008e0e
-rw-r--r--src/vogar/tasks/RunActionTask.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/vogar/tasks/RunActionTask.java b/src/vogar/tasks/RunActionTask.java
index 26b4e3e..6965676 100644
--- a/src/vogar/tasks/RunActionTask.java
+++ b/src/vogar/tasks/RunActionTask.java
@@ -152,9 +152,20 @@ public class RunActionTask extends Task implements HostMonitor.Handler {
vmCommandBuilder.args("--skipPast", skipPast);
}
- // Forward timeout value to Caliper which has its own separate timeout.
+ // Forward specific parameters to Caliper.
if (run.runnerType.supportsCaliper()) {
+ // Forward timeout value to Caliper which has its own separate timeout.
vmCommandBuilder.args("--time-limit", String.format("%ds", timeoutSeconds));
+
+ // This configuration runs about 15x faster than not having this configuration.
+ vmCommandBuilder.args(
+ // Don't run GC before each measurement. That will take forever.
+ "-Cinstrument.runtime.options.gcBeforeEach=false",
+ // Warmup super-quick, don't take more than 1sec.
+ "-Cinstrument.runtime.options.warmup=1s",
+ // Don't measure things 9 times (default) because microbenchmark already
+ // measure themselves millions of times.
+ "-Cinstrument.runtime.options.measurements=1");
}
return vmCommandBuilder
.temp(workingDirectory)