You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/04/04 20:30:32 UTC

tinkerpop git commit: TINKERPOP-1266 Provide JVM options as a configuration to benchmarks

Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 f73d7ca75 -> 95d3efc03


TINKERPOP-1266 Provide JVM options as a configuration to benchmarks

Also fixed up the configuration option for the location of the benchmark reports and added all configuration options to the pom.xml with their defaults. CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/95d3efc0
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/95d3efc0
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/95d3efc0

Branch: refs/heads/tp32
Commit: 95d3efc03baf474bf6b8c36fcc85c3e3070f34e5
Parents: f73d7ca
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Apr 4 15:48:41 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Apr 4 15:48:41 2017 -0400

----------------------------------------------------------------------
 gremlin-benchmark/pom.xml                              |  4 ++++
 .../benchmark/util/AbstractBenchmarkBase.java          | 13 +++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/95d3efc0/gremlin-benchmark/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/pom.xml b/gremlin-benchmark/pom.xml
index 17132a1..e6ed62a 100644
--- a/gremlin-benchmark/pom.xml
+++ b/gremlin-benchmark/pom.xml
@@ -95,6 +95,10 @@ limitations under the License.
                     </excludes>
                     <systemPropertyVariables>
                         <benchmarkReportDir>${project.build.directory}/reports/benchmark/</benchmarkReportDir>
+                        <jvmArgs>-server -Xms2g -Xmx2g</jvmArgs>
+                        <warmupIterations>10</warmupIterations>
+                        <measureIterations>10</measureIterations>
+                        <forks>2</forks>
                     </systemPropertyVariables>
                 </configuration>
             </plugin>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/95d3efc0/gremlin-benchmark/src/main/java/org/apache/tinkerpop/benchmark/util/AbstractBenchmarkBase.java
----------------------------------------------------------------------
diff --git a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/benchmark/util/AbstractBenchmarkBase.java b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/benchmark/util/AbstractBenchmarkBase.java
index 2f8bb66..f647f1a 100644
--- a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/benchmark/util/AbstractBenchmarkBase.java
+++ b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/benchmark/util/AbstractBenchmarkBase.java
@@ -48,10 +48,7 @@ public abstract class AbstractBenchmarkBase {
     protected static final int DEFAULT_MEASURE_ITERATIONS = 10;
     protected static final int DEFAULT_FORKS = 2;
     protected static final String DEFAULT_BENCHMARK_DIRECTORY = "./benchmarks/";
-
-    protected static final String[] JVM_ARGS = {
-            "-server", "-Xms2g", "-Xmx2g"
-    };
+    protected static final String DEFAULT_JVM_ARGS = "-server -Xms2g -Xmx2g";
 
     @Test
     public void run() throws Exception {
@@ -59,7 +56,7 @@ public abstract class AbstractBenchmarkBase {
 
         final ChainedOptionsBuilder runnerOptions = new OptionsBuilder()
                 .include(".*" + className + ".*")
-                .jvmArgs(JVM_ARGS);
+                .jvmArgs(getJvmArgs());
 
         if (getWarmupIterations() > 0) {
             runnerOptions.warmupIterations(getWarmupIterations());
@@ -104,7 +101,11 @@ public abstract class AbstractBenchmarkBase {
     }
 
     protected String getReportDir() {
-        return System.getProperty("benchmark.dir", DEFAULT_BENCHMARK_DIRECTORY);
+        return System.getProperty("benchmarkReportDir", DEFAULT_BENCHMARK_DIRECTORY);
+    }
+
+    protected String[] getJvmArgs() {
+        return System.getProperty("jvmArgs", DEFAULT_JVM_ARGS).split(" ");
     }
 
     private int getIntProperty(final String propertyName, final int defaultValue) {