usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [3/3] incubator-usergrid git commit: update docs, remove switch statement
Date Thu, 06 Nov 2014 17:53:43 GMT
update docs, remove switch statement


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

Branch: refs/heads/two-dot-o
Commit: c390bc9aa2fb64926494c39f23a567f05da76842
Parents: f79b5e9
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu Nov 6 10:53:26 2014 -0700
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu Nov 6 10:53:26 2014 -0700

----------------------------------------------------------------------
 stack/loadtests/README.md                       |  8 +++---
 .../org/apache/usergrid/settings/Settings.scala |  2 --
 .../usergrid/simulations/AppSimulation.scala    | 28 +++++---------------
 3 files changed, 11 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c390bc9a/stack/loadtests/README.md
----------------------------------------------------------------------
diff --git a/stack/loadtests/README.md b/stack/loadtests/README.md
index 54f358b..420c110 100644
--- a/stack/loadtests/README.md
+++ b/stack/loadtests/README.md
@@ -1,19 +1,19 @@
 #Running
 Gatling will run through mvn
 
-1. execute mvn clean install
+1. navigate to loadtests under stack
 
 1. execute mvn gatling:execute with these options
 
 	*Required
-	> -Dthrottle={maxReqsSec} -Dduration={durationInSecs} -Dorg={org}  -Dapp={appName} -Dbaseurl={uriNoProceedingSlash}
-DnumEntities={numberOfEntitiesYouWantToCreateInteger} -DnumUsers={totalUsersInteger} -DrampTime={rampTimeIntegerSeconds}
-DadminUser={username} -DadminPassword={pwd}
+	> -Dthrottle={maxReqsSec} -Dduration={durationInSecs} -Dorg={org}  -Dapp={appName} -Dbaseurl={uriNoProceedingSlash}
-DnumEntities={numberOfEntitiesYouWantToCreateInteger} -DnumUsers={totalUsersInteger} -DrampTime={rampTimeIntegerSeconds}
-DadminUser={username} -DadminPassword={pwd} 
 
 	*Addional optional settings 
 		
-	>-DpushNotifier={notifierName} -DpushProvider={noop_apns_or_gcm} -Dsimulation={simulationNameOrAll}
+	>-DpushNotifier={notifierName} -DpushProvider={noop_apns_or_gcm} -Dsc={simulationFQDN}
 
 	So running will look something like this
-	>mvn gatling:execute -Dthrottle=100 -Dduration=300 -Dorg=usergrid  -Dapp=load -Dbaseurl=http://load.usergrid.com
-DnumEntities=300 -DnumUsers=600 -DrampTime=30 -DadminUser=usergrid -DadminPassword=test -Dsimulation=all
+	>mvn gatling:execute -Dthrottle=100 -Dduration=300 -Dorg=usergrid  -Dapp=load -Dbaseurl=http://load.usergrid.com
-DnumEntities=300 -DnumUsers=600 -DrampTime=30 -DadminUser=usergrid -DadminPassword=test -Dsc=org.apache.usergrid.simulations.AppSimulation
 	
 	Setting the rampTime => Injects a given number of users with a linear ramp over a given
duration.
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c390bc9a/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Settings.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Settings.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Settings.scala
index 3a0d23d..03a4200 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Settings.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Settings.scala
@@ -64,6 +64,4 @@ object Settings {
   val constantUsers:Int = Settings.numUsers/Settings.duration
   println(s"Will inject $constantUsers users per sec")
 
-  var simulation:String =  if(System.getProperty("simulation") != null) System.getProperty("simulation")
else "all"
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c390bc9a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AppSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AppSimulation.scala
b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AppSimulation.scala
index 9805eea..50a4728 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AppSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AppSimulation.scala
@@ -31,10 +31,7 @@ import scala.concurrent.duration._
 /**
  * Classy class class.
  */
-class AppSimulation extends Simulation{
-
-  val simulation = Settings.simulation
-  println(s"Running simulation $simulation")
+class AppSimulation extends Simulation {
 
   println("Begin setup")
   Setup.setupOrg()
@@ -43,21 +40,10 @@ class AppSimulation extends Simulation{
   Setup.setupUsers()
   println("End Setup")
 
-  def sim(choice:String) = (choice: @switch) match {
-    case "connections" =>
-      setUp(
-        NotificationScenarios.createScenario
-          .inject(constantUsersPerSec(Settings.constantUsers) during (Settings.duration))
// wait for 15 seconds so create org can finish, need to figure out coordination
-          .throttle(reachRps(Settings.throttle) in ( Settings.rampTime.seconds))
-          .protocols( Settings.httpConf.acceptHeader("application/json"))
-      )
-    case "all" =>
-      setUp(
-        NotificationScenarios.createScenario
-          .inject(constantUsersPerSec(Settings.constantUsers) during (Settings.duration))
// wait for 15 seconds so create org can finish, need to figure out coordination
-          .throttle(reachRps(Settings.throttle) in (Settings.rampTime.seconds))
-          .protocols(Settings.httpConf.acceptHeader("application/json"))
-      )
-  }
-  sim(simulation)
+  setUp(
+    NotificationScenarios.createScenario
+      .inject(constantUsersPerSec(Settings.constantUsers) during (Settings.duration)) //
wait for 15 seconds so create org can finish, need to figure out coordination
+      .throttle(reachRps(Settings.throttle) in (Settings.rampTime.seconds))
+      .protocols(Settings.httpConf.acceptHeader("application/json"))
+  )
 }


Mime
View raw message