You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/12/03 17:55:45 UTC

[1/2] incubator-usergrid git commit: Changed comparator to be more concise

Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-252 c2bc921db -> 9222856e4


Changed comparator to be more concise


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/08471c9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/08471c9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/08471c9e

Branch: refs/heads/USERGRID-252
Commit: 08471c9e0f2268603423b9acdd19529190985352
Parents: c2bc921
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Dec 3 09:16:18 2014 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Wed Dec 3 09:16:18 2014 -0700

----------------------------------------------------------------------
 stack/awscluster/src/main/groovy/NodeRegistry.groovy | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08471c9e/stack/awscluster/src/main/groovy/NodeRegistry.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/NodeRegistry.groovy b/stack/awscluster/src/main/groovy/NodeRegistry.groovy
index 0288ae4..8d695e2 100644
--- a/stack/awscluster/src/main/groovy/NodeRegistry.groovy
+++ b/stack/awscluster/src/main/groovy/NodeRegistry.groovy
@@ -109,7 +109,6 @@ class NodeRegistry {
 
             for (reservation in nodes.getReservations()) {
 
-                //TODO, add these to a list then sort them by date, then name
                 for (instance in reservation.getInstances()) {
                     servers.add(new ServerEntry(instance.launchTime, instance.publicDnsName));
                 }
@@ -169,15 +168,14 @@ class NodeRegistry {
 
         @Override
         int compareTo(final ServerEntry o) {
-            if (launchDate.before(o.launchDate)) {
-                -1;
-            } else if (launchDate.after(o.launchDate)) {
-                return 1;
-            }
 
-            return publicIp.compareTo(o.publicIp);
+            int compare = launchDate.compareTo(o.launchDate)
 
+            if(compare == 0){
+                compare =  publicIp.compareTo(o.publicIp);
+            }
 
+            return compare
         }
 
         boolean equals(final o) {


[2/2] incubator-usergrid git commit: Fixes user ramp values

Posted by to...@apache.org.
Fixes user ramp values


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/9222856e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/9222856e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/9222856e

Branch: refs/heads/USERGRID-252
Commit: 9222856e4f628cef0f90cc873e9c4be14b81bb5c
Parents: 08471c9
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Dec 3 09:55:33 2014 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Wed Dec 3 09:55:33 2014 -0700

----------------------------------------------------------------------
 .../org/apache/usergrid/simulations/PostUsersSimulation.scala      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9222856e/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostUsersSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostUsersSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostUsersSimulation.scala
index 45a4437..5184e92 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostUsersSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/PostUsersSimulation.scala
@@ -43,7 +43,7 @@ class PostUsersSimulation extends Simulation {
          * injection steps take from this forum post
          * https://groups.google.com/forum/#!topic/gatling/JfYHaWCbA-w
          */
-        rampUsersPerSec(1) to (Settings.maxPossibleUsers) during Settings.rampTime,
+        rampUsers(Settings.maxPossibleUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.maxPossibleUsers) during Settings.duration
 
       )).protocols(Settings.httpConf.acceptHeader("application/json"))