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/02 22:51:16 UTC
incubator-usergrid git commit: Updates PostUsers simulation to take
into account only concurrent users.
Repository: incubator-usergrid
Updated Branches:
refs/heads/USERGRID-252 b9a2694da -> ed587408e
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/USERGRID-252
Commit: ed587408e258ca34a21bfb2a32e2792b3ef352be
Parents: b9a2694
Author: Todd Nine <tn...@apigee.com>
Authored: Tue Dec 2 14:51:13 2014 -0700
Committer: Todd Nine <tn...@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"))
}