benchmarks: Speed up execution of caliper benchmarks by 15x am: 6605ea3e8b am: aa03b34be8 am: 6c8dbb0111
am: 4d3ec0a14c
Change-Id: I1c06b87e4738ef819fcf612eaf1fb1c76feb0ffe
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 @@
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)