usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [14/16] incubator-usergrid git commit: Updates PostUsers simulation to take into account only concurrent users.
Date Wed, 03 Dec 2014 17:58:29 GMT
Updates PostUsers simulation to take into account only concurrent users.


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

Branch: refs/heads/two-dot-o
Commit: ed587408e258ca34a21bfb2a32e2792b3ef352be
Parents: b9a2694
Author: Todd Nine <tnine@apigee.com>
Authored: Tue Dec 2 14:51:13 2014 -0700
Committer: Todd Nine <tnine@apigee.com>
Committed: Tue Dec 2 14:51:13 2014 -0700

----------------------------------------------------------------------
 .../simulations/PostUsersSimulation.scala       | 22 ++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ed587408/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 6992958..45a4437 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
@@ -21,8 +21,13 @@ import org.apache.usergrid.helpers.Setup
 import org.apache.usergrid.scenarios.UserScenarios
 import org.apache.usergrid.settings.Settings
 
-import scala.concurrent.duration._
-
+/**
+ * Posts application users continually to an application.  Expects the following parameters
+ *
+ * -DmaxPossibleUsers : The maximum number of users to be making requests as fast as possible.
 Think of this as conccurrent users in the system
+ * -DrampTime: The amount of time (in seconds) to allow for maxPossibleUsers to be reached.
 This will add new users linearlly
+ * -Dduration: The amount of time (in seconds) to continue to perform requests up with the
maxPossibleUsers
+ */
 class PostUsersSimulation extends Simulation {
 
   println("Begin setup")
@@ -33,9 +38,14 @@ class PostUsersSimulation extends Simulation {
 
   setUp(
     UserScenarios.postUsersInfinitely
-      .inject(constantUsersPerSec(Settings.maxPossibleUsers) during (Settings.duration))
// wait for 15 seconds so create org can finish, need to figure out coordination
-
-
-  )  .throttle(reachRps(Settings.maxPossibleUsers) in (Settings.rampTime.seconds)).protocols(Settings.httpConf.acceptHeader("application/json"))
+      .inject(
+        /**
+         * injection steps take from this forum post
+         * https://groups.google.com/forum/#!topic/gatling/JfYHaWCbA-w
+         */
+        rampUsersPerSec(1) to (Settings.maxPossibleUsers) during Settings.rampTime,
+        constantUsersPerSec(Settings.maxPossibleUsers) during Settings.duration
+
+      )).protocols(Settings.httpConf.acceptHeader("application/json"))
 
 }


Mime
View raw message