You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2019/04/12 19:58:15 UTC

[geode-benchmarks] branch develop updated: GEODE-6628: Increase thread count (#76)

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new e4e0953  GEODE-6628: Increase thread count (#76)
e4e0953 is described below

commit e4e0953d68d6d3451b2cd93c7ff7844df6d459a6
Author: Helena Bales <hb...@pivotal.io>
AuthorDate: Fri Apr 12 12:58:11 2019 -0700

    GEODE-6628: Increase thread count (#76)
---
 .../org/apache/geode/perftest/WorkloadConfig.java  |  2 +-
 .../geode/infrastructure/aws/ExpireClusters.java   | 49 ++++++++++++----------
 2 files changed, 28 insertions(+), 23 deletions(-)

diff --git a/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java b/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
index 0c86347..1ca4525 100644
--- a/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
+++ b/harness/src/main/java/org/apache/geode/perftest/WorkloadConfig.java
@@ -32,7 +32,7 @@ import org.apache.geode.perftest.yardstick.YardstickTask;
 public class WorkloadConfig implements Serializable {
   long durationSeconds = 1;
   long warmupSeconds = 0;
-  int threads = Runtime.getRuntime().availableProcessors() * 2;
+  int threads = Runtime.getRuntime().availableProcessors() * 16;
 
   public WorkloadConfig() {}
 
diff --git a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/ExpireClusters.java b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/ExpireClusters.java
index 991bc9b..2ae1a8a 100644
--- a/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/ExpireClusters.java
+++ b/infrastructure/src/main/java/org/apache/geode/infrastructure/aws/ExpireClusters.java
@@ -63,17 +63,21 @@ public class ExpireClusters {
                 .values("running")
                 .build())
             .build());
-    Stream<Instance> instances = describeInstancesResponse.reservations().stream().flatMap(reservation -> reservation.instances().stream());
+    Stream<Instance> instances = describeInstancesResponse.reservations().stream()
+        .flatMap(reservation -> reservation.instances().stream());
 
-    Stream<Instance> expiredInstances = instances.filter(instance -> isBefore(instance.getValueForField("LaunchTime", Instant.class), expirationTime));
+    Stream<Instance> expiredInstances = instances
+        .filter(instance -> isBefore(instance.getValueForField("LaunchTime", Instant.class),
+            expirationTime));
     Stream<String> tags = expiredInstances.map(ExpireClusters::getTagForInstance);
-    List<String> distinctTags = tags.distinct().filter(tag -> !tag.isEmpty()).collect(Collectors.toList());
+    List<String> distinctTags =
+        tags.distinct().filter(tag -> !tag.isEmpty()).collect(Collectors.toList());
     return distinctTags;
   }
 
   private static boolean isBefore(Optional<Instant> launchTime, Instant expirationTime) {
-    if(launchTime.isPresent()) {
-      if(launchTime.get().isBefore(expirationTime)) {
+    if (launchTime.isPresent()) {
+      if (launchTime.get().isBefore(expirationTime)) {
         return true;
       }
     }
@@ -82,29 +86,30 @@ public class ExpireClusters {
 
   private static String getTagForInstance(Instance expiredInstance) {
     Stream<Tag> expiredInstanceTagStream = expiredInstance.tags().stream();
-    Stream<Tag> geodeBenchmarksTagStream = expiredInstanceTagStream.filter(tag -> tag.key().equals("geode-benchmarks"));
-    List<String> expiredTags = geodeBenchmarksTagStream.map(Tag::value).collect(Collectors.toList());
+    Stream<Tag> geodeBenchmarksTagStream =
+        expiredInstanceTagStream.filter(tag -> tag.key().equals("geode-benchmarks"));
+    List<String> expiredTags =
+        geodeBenchmarksTagStream.map(Tag::value).collect(Collectors.toList());
     if (expiredTags.size() > 0) {
       return expiredTags.get(0);
-    }
-    else {
+    } else {
       return "";
     }
   }
 
-//  private static Date convertToDate(Optional<Instant> optionalDate) {
-//    try {
-//      // "2018-03-20T21:38:47.000Z"
-//      if(optionalDate.isPresent()) {
-//        String date = optionalDate.get();
-//        return new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss.SSSZ").parse(date);
-//      }
-//    } catch (ParseException e) {
-//      e.printStackTrace();
-//    }
-//
-//    return null;
-//  }
+  // private static Date convertToDate(Optional<Instant> optionalDate) {
+  // try {
+  // // "2018-03-20T21:38:47.000Z"
+  // if(optionalDate.isPresent()) {
+  // String date = optionalDate.get();
+  // return new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss.SSSZ").parse(date);
+  // }
+  // } catch (ParseException e) {
+  // e.printStackTrace();
+  // }
+  //
+  // return null;
+  // }
 
   private static void usage(String s) {
     throw new IllegalStateException(s);