usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [08/42] incubator-usergrid git commit: better logging
Date Mon, 10 Nov 2014 23:21:33 GMT
better logging


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

Branch: refs/heads/es-type-updates
Commit: b6a7fc0b403b995c0f3e428c61de241fe076d89c
Parents: 7f7c936
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu Nov 6 08:43:13 2014 -0700
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu Nov 6 08:43:13 2014 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/usergrid/helpers/Setup.scala    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/b6a7fc0b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
index 3782726..96ce1c9 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
@@ -107,16 +107,22 @@ object Setup {
   def setupUsers() = {
     val userFeeder = FeederGenerator.generateUserWithGeolocationFeeder(Settings.numUsers
, Settings.userLocationRadius, Settings.centerLatitude, Settings.centerLongitude)
     val numUsers = userFeeder.length
-    println(s"Sending requests for $numUsers users")
+    println(s"setupUsers: Sending requests for $numUsers users")
 
     val list:ArrayBuffer[ListenableFuture[Response]] = new ArrayBuffer[ListenableFuture[Response]]
     userFeeder.foreach(user => {
       list += setupUser(user);
     });
+    var successCount:Int = 0;
     list.foreach(f => {
       val response = f.get()
-      printResponse("Post user",response.getStatusCode,response.getResponseBody())
+      if(response.getStatusCode != 200) {
+        printResponse("Post User", response.getStatusCode, response.getResponseBody())
+      }else{
+        successCount+=1
+      }
     })
+    println(s"setupUsers: Received $successCount successful responses out of $numUsers requests.")
 
   }
 


Mime
View raw message