You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by up...@apache.org on 2021/03/30 20:21:21 UTC

[geode-benchmarks] branch feature/redis-performance-testing updated (d849a92 -> 0506597)

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

upthewaterspout pushed a change to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git.


    from d849a92  Removing locator wait time property
     new 3e21806  Adding some timeouts and capturing stdout/stderr for redis cluster tests
     new cb7432b  Adding some sleeps to retrying a docker command
     new 0506597  Only calling CreateRedisCluster on the first client

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../geode/benchmark/tasks/ProcessControl.java      |  9 +++++++++
 .../benchmark/tasks/redis/CreateRedisCluster.java  | 22 +++++++++++++++++-----
 2 files changed, 26 insertions(+), 5 deletions(-)

[geode-benchmarks] 03/03: Only calling CreateRedisCluster on the first client

Posted by up...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit 0506597209c3b3bf3e95f4b346610a3c77eab75c
Author: Dan Smith <da...@vmware.com>
AuthorDate: Mon Mar 22 16:14:17 2021 -0700

    Only calling CreateRedisCluster on the first client
---
 .../benchmark/tasks/redis/CreateRedisCluster.java  | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/CreateRedisCluster.java b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/CreateRedisCluster.java
index a1a718a..ea3b419 100644
--- a/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/CreateRedisCluster.java
+++ b/geode-benchmarks/src/main/java/org/apache/geode/benchmark/tasks/redis/CreateRedisCluster.java
@@ -18,7 +18,9 @@
 package org.apache.geode.benchmark.tasks.redis;
 
 import static java.util.Arrays.asList;
+import static java.util.stream.Collectors.toList;
 import static org.apache.geode.benchmark.tasks.ProcessControl.retryUntilZeroExit;
+import static org.apache.geode.benchmark.topology.Roles.CLIENT;
 import static org.apache.geode.benchmark.topology.Roles.SERVER;
 
 import java.net.InetAddress;
@@ -26,19 +28,27 @@ import java.util.List;
 import java.util.Set;
 import java.util.stream.Collectors;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import org.apache.geode.perftest.Task;
 import org.apache.geode.perftest.TestContext;
 
-/**
- * Task to create the server cache and start the cache server.
- */
 public class CreateRedisCluster implements Task {
 
-
-  public CreateRedisCluster() {}
+  private static final Logger logger = LoggerFactory.getLogger(CreateRedisCluster.class);
 
   @Override
   public void run(final TestContext context) throws Exception {
+    final List<Integer> hostsIDsForRole =
+        context.getHostsIDsForRole(CLIENT.name()).stream().sorted().collect(toList());
+    final int self = context.getJvmID();
+    final int position = hostsIDsForRole.indexOf(self);
+
+    if (0 != position) {
+      return;
+    }
+
     final Set<InetAddress> servers = context.getHostsForRole(SERVER.name());
 
     final List<String> redisNodes =
@@ -57,6 +67,8 @@ public class CreateRedisCluster implements Task {
         "--cluster-replicas", "1",
         "--cluster-yes"));
 
+    logger.info("Creating redis cluster. {}", processBuilder.command());
+
     retryUntilZeroExit(processBuilder);
   }
 

[geode-benchmarks] 02/03: Adding some sleeps to retrying a docker command

Posted by up...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit cb7432b5be2c09556f9f2127da37ff08c4db42e0
Author: Dan Smith <da...@vmware.com>
AuthorDate: Mon Mar 22 16:06:05 2021 -0700

    Adding some sleeps to retrying a docker command
---
 .../src/main/java/org/apache/geode/benchmark/tasks/ProcessControl.java   | 1 +
 1 file changed, 1 insertion(+)

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 3e9e441..57905a3 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
@@ -68,6 +68,7 @@ public class ProcessControl {
         if(System.nanoTime() - start > RETRY_TIMEOUT.toNanos()) {
           throw new RuntimeException(msg);
         }
+        Thread.sleep(100);
         continue;
       }
       break;

[geode-benchmarks] 01/03: Adding some timeouts and capturing stdout/stderr for redis cluster tests

Posted by up...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/redis-performance-testing
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git

commit 3e21806c229fbd2be1d33bd69f4cc55dafd7187f
Author: Dan Smith <da...@vmware.com>
AuthorDate: Mon Mar 22 15:56:25 2021 -0700

    Adding some timeouts and capturing stdout/stderr for redis cluster tests
---
 .../java/org/apache/geode/benchmark/tasks/ProcessControl.java     | 8 ++++++++
 1 file changed, 8 insertions(+)

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 1ea2d4d..3e9e441 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
@@ -18,11 +18,13 @@ import static java.lang.String.format;
 import static java.lang.String.join;
 
 import java.io.IOException;
+import java.time.Duration;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class ProcessControl {
+  private static final Duration RETRY_TIMEOUT = Duration.ofMinutes(1);
 
   private static final Logger logger = LoggerFactory.getLogger(ProcessControl.class);
 
@@ -39,6 +41,7 @@ public class ProcessControl {
 
   public static void runAndExpectZeroExit(final ProcessBuilder processBuilder)
       throws IOException, InterruptedException {
+    processBuilder.inheritIO();
     final Process process = processBuilder.start();
     final int exitStatus = process.waitFor();
     if (exitStatus != 0) {
@@ -52,7 +55,9 @@ public class ProcessControl {
 
   public static void retryUntilZeroExit(final ProcessBuilder processBuilder)
       throws IOException, InterruptedException {
+    long start = System.nanoTime();
     while (true) {
+      processBuilder.inheritIO();
       final Process process = processBuilder.start();
       final int exitStatus = process.waitFor();
       if (exitStatus != 0) {
@@ -60,6 +65,9 @@ public class ProcessControl {
             format("'%s' command exited with status %d", join(" ", processBuilder.command()),
                 exitStatus, System.getProperty("user.dir"));
         logger.error(msg);
+        if(System.nanoTime() - start > RETRY_TIMEOUT.toNanos()) {
+          throw new RuntimeException(msg);
+        }
         continue;
       }
       break;