You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/11/10 15:23:54 UTC
[12/50] [abbrv] incubator-usergrid git commit: better logging
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/two-dot-o-events
Commit: b6a7fc0b403b995c0f3e428c61de241fe076d89c
Parents: 7f7c936
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 6 08:43:13 2014 -0700
Committer: Shawn Feldman <sf...@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.")
}