This is an automated email from the ASF dual-hosted git repository.

burcham pushed a commit to branch sni
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git


The following commit(s) were added to refs/heads/sni by this push:
     new 4fde586  sni: spA
4fde586 is described below

commit 4fde586a4ea7719ca025703838c0594afc3aa491
Author: Bill Burcham <[email protected]>
AuthorDate: Sun May 17 12:14:14 2020 -0700

    sni: spA
---
 .../java/org/apache/geode/benchmark/Config.java    |  3 +-
 .../apache/geode/benchmark/parameters/Utils.java   |  2 +-
 .../geode/benchmark/tasks/ProcessControl.java      |  3 +-
 .../benchmark/tests/PartitionedPutBenchmark.java   |  1 -
 .../tests/PartitionedPutBenchmarkSNI.java          |  5 +--
 .../tests/PartitionedPutLongBenchmark.java         |  1 -
 .../tests/ReplicatedNonIndexedQueryBenchmark.java  |  3 +-
 .../benchmark/topology/ClientServerTopology.java   | 10 ++---
 .../topology/ClientServerTopologyWithSNIProxy.java |  5 +--
 .../parameters/GcLoggingParametersTest.java        | 18 +++++---
 .../benchmark/parameters/GcParametersTest.java     | 18 +++++---
 .../tests/PartitionedPutBenchmarkSNITest.java      | 51 ++++++++++++++++++++++
 .../topology/ClientServerTopologyTest.java         |  3 +-
 13 files changed, 91 insertions(+), 32 deletions(-)

diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/Config.java 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/Config.java
index ac2e5fc..a054f24 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/Config.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/Config.java
@@ -22,7 +22,8 @@ public class Config {
     config.before(task, role.name());
   }
 
-  public static void workload(final TestConfig config, final BenchmarkDriver 
task, final Roles role) {
+  public static void workload(final TestConfig config, final BenchmarkDriver 
task,
+      final Roles role) {
     config.workload(task, role.name());
   }
 
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/Utils.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/Utils.java
index 1dc56d8..18b4e51 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/Utils.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/parameters/Utils.java
@@ -39,7 +39,7 @@ public class Utils {
   }
 
   public static void addToTestConfig(TestConfig testConfig, String 
systemPropertyKey,
-                                     String jvmArgument) {
+      String jvmArgument) {
     if (Boolean.getBoolean(systemPropertyKey)) {
       logger.info("Configuring JVMs to run with " + jvmArgument);
       configureJavaRoles(testConfig, jvmArgument);
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
index 512b7df..562af01 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java
@@ -27,7 +27,8 @@ public class ProcessControl {
     final Process startDaemon = Runtime.getRuntime().exec(command);
     final int exitStatus = startDaemon.waitFor();
     if (exitStatus != 0) {
-      final String msg = String.format("'%s' command exited with status %d", 
command, exitStatus);
+      final String msg = String.format("'%s' command exited with status 
%d\npwd is: %s", command,
+          exitStatus, System.getProperty("user.dir"));
       logger.error(msg);
       throw new IllegalStateException(msg);
     }
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
index 732a422..996bd38 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmark.java
@@ -61,6 +61,5 @@ public class PartitionedPutBenchmark implements 
PerformanceTest {
     before(config, new PrePopulateRegion(keyRange), CLIENT);
     workload(config, new PutTask(keyRange), CLIENT);
     return config;
-
   }
 }
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNI.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNI.java
index 460af78..49568d8 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNI.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNI.java
@@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test;
 import org.apache.geode.benchmark.LongRange;
 import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
 import org.apache.geode.benchmark.tasks.CreatePartitionedRegion;
-import org.apache.geode.benchmark.tasks.PrePopulateRegion;
+import org.apache.geode.benchmark.tasks.PrePopulateRegionLong;
 import org.apache.geode.benchmark.tasks.PutTask;
 import org.apache.geode.benchmark.topology.ClientServerTopologyWithSNIProxy;
 import org.apache.geode.perftest.PerformanceTest;
@@ -59,9 +59,8 @@ public class PartitionedPutBenchmarkSNI implements 
PerformanceTest {
     ClientServerTopologyWithSNIProxy.configure(config);
     before(config, new CreatePartitionedRegion(), SERVER);
     before(config, new CreateClientProxyRegion(), CLIENT);
-    before(config, new PrePopulateRegion(keyRange), CLIENT);
+    before(config, new PrePopulateRegionLong(keyRange), CLIENT);
     workload(config, new PutTask(keyRange), CLIENT);
     return config;
-
   }
 }
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutLongBenchmark.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutLongBenchmark.java
index bb5d7e5..b3db678 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutLongBenchmark.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/PartitionedPutLongBenchmark.java
@@ -61,6 +61,5 @@ public class PartitionedPutLongBenchmark implements 
PerformanceTest {
     before(config, new PrePopulateRegionLong(keyRange), CLIENT);
     workload(config, new PutTask(keyRange), CLIENT);
     return config;
-
   }
 }
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedNonIndexedQueryBenchmark.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedNonIndexedQueryBenchmark.java
index 4d93b96..aa3eabf 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedNonIndexedQueryBenchmark.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tests/ReplicatedNonIndexedQueryBenchmark.java
@@ -14,14 +14,13 @@
  */
 package org.apache.geode.benchmark.tests;
 
-import static org.apache.geode.benchmark.Config.*;
 import static org.apache.geode.benchmark.Config.before;
+import static org.apache.geode.benchmark.Config.workload;
 import static org.apache.geode.benchmark.topology.Roles.CLIENT;
 import static org.apache.geode.benchmark.topology.Roles.SERVER;
 
 import org.junit.jupiter.api.Test;
 
-import org.apache.geode.benchmark.Config;
 import org.apache.geode.benchmark.LongRange;
 import org.apache.geode.benchmark.tasks.CreateClientProxyRegion;
 import org.apache.geode.benchmark.tasks.CreateReplicatedRegion;
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopology.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopology.java
index 486e743..63fa137 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopology.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopology.java
@@ -17,13 +17,11 @@ package org.apache.geode.benchmark.topology;
 import static org.apache.geode.benchmark.Config.before;
 import static org.apache.geode.benchmark.Config.role;
 import static org.apache.geode.benchmark.parameters.Utils.addToTestConfig;
+import static org.apache.geode.benchmark.topology.Ports.LOCATOR_PORT;
 import static org.apache.geode.benchmark.topology.Roles.CLIENT;
 import static org.apache.geode.benchmark.topology.Roles.LOCATOR;
 import static org.apache.geode.benchmark.topology.Roles.SERVER;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import org.apache.geode.benchmark.parameters.GcLoggingParameters;
 import org.apache.geode.benchmark.parameters.GcParameters;
 import org.apache.geode.benchmark.parameters.HeapParameters;
@@ -55,9 +53,9 @@ public class ClientServerTopology {
     addToTestConfig(config, "withSsl", WITH_SSL_ARGUMENT);
     addToTestConfig(config, "withSecurityManager", 
WITH_SECURITY_MANAGER_ARGUMENT);
 
-    before(config, new StartLocator(Ports.LOCATOR_PORT), LOCATOR);
-    before(config, new StartServer(Ports.LOCATOR_PORT), SERVER);
-    before(config, new StartClient(Ports.LOCATOR_PORT), CLIENT);
+    before(config, new StartLocator(LOCATOR_PORT), LOCATOR);
+    before(config, new StartServer(LOCATOR_PORT), SERVER);
+    before(config, new StartClient(LOCATOR_PORT), CLIENT);
   }
 
 }
diff --git 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopologyWithSNIProxy.java
 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopologyWithSNIProxy.java
index 1451391..2c29fa9 100644
--- 
a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopologyWithSNIProxy.java
+++ 
b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/topology/ClientServerTopologyWithSNIProxy.java
@@ -21,12 +21,11 @@ import static org.apache.geode.benchmark.Config.role;
 import static org.apache.geode.benchmark.parameters.Utils.addToTestConfig;
 import static org.apache.geode.benchmark.parameters.Utils.configureJavaRoles;
 import static org.apache.geode.benchmark.topology.Ports.LOCATOR_PORT;
-import static org.apache.geode.benchmark.topology.Roles.SERVER;
-import static org.apache.geode.benchmark.topology.Roles.LOCATOR;
 import static org.apache.geode.benchmark.topology.Roles.CLIENT;
+import static org.apache.geode.benchmark.topology.Roles.LOCATOR;
 import static org.apache.geode.benchmark.topology.Roles.PROXY;
+import static org.apache.geode.benchmark.topology.Roles.SERVER;
 
-import org.apache.geode.benchmark.Config;
 import org.apache.geode.benchmark.parameters.GcLoggingParameters;
 import org.apache.geode.benchmark.parameters.GcParameters;
 import org.apache.geode.benchmark.parameters.HeapParameters;
diff --git 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcLoggingParametersTest.java
 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcLoggingParametersTest.java
index 23e5ea8..f1caa05 100644
--- 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcLoggingParametersTest.java
+++ 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcLoggingParametersTest.java
@@ -80,18 +80,24 @@ class GcLoggingParametersTest {
     
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).contains("-Xloggc:OUTPUT_DIR/gc.log");
     
assertThat(testConfig.getJvmArgs().get(SERVER.name())).contains("-Xloggc:OUTPUT_DIR/gc.log");
     
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).contains("-Xloggc:OUTPUT_DIR/gc.log");
-    
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain("-Xlog:gc:OUTPUT_DIR/gc.log");
-    
assertThat(testConfig.getJvmArgs().get(SERVER.name())).doesNotContain("-Xlog:gc:OUTPUT_DIR/gc.log");
-    
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).doesNotContain("-Xlog:gc:OUTPUT_DIR/gc.log");
+    assertThat(testConfig.getJvmArgs().get(CLIENT.name()))
+        .doesNotContain("-Xlog:gc:OUTPUT_DIR/gc.log");
+    assertThat(testConfig.getJvmArgs().get(SERVER.name()))
+        .doesNotContain("-Xlog:gc:OUTPUT_DIR/gc.log");
+    assertThat(testConfig.getJvmArgs().get(LOCATOR.name()))
+        .doesNotContain("-Xlog:gc:OUTPUT_DIR/gc.log");
   }
 
   private void assertThatJava9GcLog(TestConfig testConfig) {
     
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).contains("-Xlog:gc*:OUTPUT_DIR/gc.log");
     
assertThat(testConfig.getJvmArgs().get(SERVER.name())).contains("-Xlog:gc*:OUTPUT_DIR/gc.log");
     
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).contains("-Xlog:gc*:OUTPUT_DIR/gc.log");
-    
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain("-Xloggc:OUTPUT_DIR/gc.log");
-    
assertThat(testConfig.getJvmArgs().get(SERVER.name())).doesNotContain("-Xloggc:OUTPUT_DIR/gc.log");
-    
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).doesNotContain("-Xloggc:OUTPUT_DIR/gc.log");
+    assertThat(testConfig.getJvmArgs().get(CLIENT.name()))
+        .doesNotContain("-Xloggc:OUTPUT_DIR/gc.log");
+    assertThat(testConfig.getJvmArgs().get(SERVER.name()))
+        .doesNotContain("-Xloggc:OUTPUT_DIR/gc.log");
+    assertThat(testConfig.getJvmArgs().get(LOCATOR.name()))
+        .doesNotContain("-Xloggc:OUTPUT_DIR/gc.log");
   }
 
 }
diff --git 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcParametersTest.java
 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcParametersTest.java
index b4a1696..9e456fd 100644
--- 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcParametersTest.java
+++ 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/parameters/GcParametersTest.java
@@ -106,9 +106,12 @@ class GcParametersTest {
     
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).contains(XX_USE_G_1_GC);
     
assertThat(testConfig.getJvmArgs().get(SERVER.name())).contains(XX_USE_G_1_GC);
     
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).contains(XX_USE_G_1_GC);
-    
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
-    
assertThat(testConfig.getJvmArgs().get(SERVER.name())).doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
-    
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
+    assertThat(testConfig.getJvmArgs().get(CLIENT.name()))
+        .doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
+    assertThat(testConfig.getJvmArgs().get(SERVER.name()))
+        .doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
+    assertThat(testConfig.getJvmArgs().get(LOCATOR.name()))
+        .doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
     
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain(XX_USE_ZGC);
     
assertThat(testConfig.getJvmArgs().get(SERVER.name())).doesNotContain(XX_USE_ZGC);
     
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).doesNotContain(XX_USE_ZGC);
@@ -118,9 +121,12 @@ class GcParametersTest {
     
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).contains(XX_USE_ZGC);
     
assertThat(testConfig.getJvmArgs().get(SERVER.name())).contains(XX_USE_ZGC);
     
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).contains(XX_USE_ZGC);
-    
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
-    
assertThat(testConfig.getJvmArgs().get(SERVER.name())).doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
-    
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
+    assertThat(testConfig.getJvmArgs().get(CLIENT.name()))
+        .doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
+    assertThat(testConfig.getJvmArgs().get(SERVER.name()))
+        .doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
+    assertThat(testConfig.getJvmArgs().get(LOCATOR.name()))
+        .doesNotContain(XX_USE_CONC_MARK_SWEEP_GC);
     
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain(XX_USE_G_1_GC);
     
assertThat(testConfig.getJvmArgs().get(SERVER.name())).doesNotContain(XX_USE_G_1_GC);
     
assertThat(testConfig.getJvmArgs().get(LOCATOR.name())).doesNotContain(XX_USE_G_1_GC);
diff --git 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNITest.java
 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNITest.java
new file mode 100644
index 0000000..2dc0e2d
--- /dev/null
+++ 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/tests/PartitionedPutBenchmarkSNITest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geode.benchmark.tests;
+
+
+
+import java.io.File;
+import java.nio.file.Path;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junitpioneer.jupiter.TempDirectory;
+
+import org.apache.geode.benchmark.LongRange;
+import org.apache.geode.perftest.TestRunners;
+
+@ExtendWith(TempDirectory.class)
+public class PartitionedPutBenchmarkSNITest {
+
+  private File folder;
+
+  @BeforeEach
+  void createTemporaryFolder(@TempDirectory.TempDir Path tempFolder) {
+    folder = tempFolder.toFile();
+  }
+
+  @Test
+  public void benchmarkRunsSuccessfully()
+      throws Exception {
+    final PartitionedPutBenchmarkSNI test = new PartitionedPutBenchmarkSNI();
+    test.setKeyRange(new LongRange(0, 100));
+    TestRunners.minimalRunner(folder)
+        .runTest(test);
+  }
+}
diff --git 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/topology/ClientServerTopologyTest.java
 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/topology/ClientServerTopologyTest.java
index 2eda6eb..4fed317 100644
--- 
a/geode-benchmarks/src/test/java/org/apache/geode/benchmark/topology/ClientServerTopologyTest.java
+++ 
b/geode-benchmarks/src/test/java/org/apache/geode/benchmark/topology/ClientServerTopologyTest.java
@@ -60,7 +60,8 @@ public class ClientServerTopologyTest {
   public void configWithoutSecurityManager() {
     TestConfig testConfig = new TestConfig();
     ClientServerTopology.configure(testConfig);
-    
assertThat(testConfig.getJvmArgs().get(CLIENT.name())).doesNotContain("-DwithSecurityManager=true");
+    assertThat(testConfig.getJvmArgs().get(CLIENT.name()))
+        .doesNotContain("-DwithSecurityManager=true");
   }
 
   @Test

Reply via email to