usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject git commit: documenting simulations
Date Thu, 06 Nov 2014 16:18:44 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o 2a0ed717a -> 11168eafa


documenting simulations


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

Branch: refs/heads/two-dot-o
Commit: 11168eafa82a2f41fd17f73d8456a669a16c5285
Parents: 2a0ed71
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Thu Nov 6 09:18:20 2014 -0700
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Thu Nov 6 09:18:20 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11168eaf/stack/loadtests/README.md
----------------------------------------------------------------------
diff --git a/stack/loadtests/README.md b/stack/loadtests/README.md
index 8b13789..18348c3 100644
--- a/stack/loadtests/README.md
+++ b/stack/loadtests/README.md
@@ -1 +1,29 @@
+#Running
+Gatling will run through mvn
+
+execute mvn clean install
+
+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}
+
+*Addional optional settings 
+	
+>-DpushNotifier={notifierName} -DpushProvider=noop
+
+So running will look something like this
+>mvn gatling:execute -Dthrottle={maxReqsSec} -Dduration={durationInSecs} -Dorg={org} 
-Dapp={appName} -Dbaseurl={uriNoProceedingSlash} -DnumEntities={numberOfEntitiesYouWantToCreateInteger}
-DnumUsers={totalUsersInteger} -DrampTime={rampTimeIntegerSeconds} -DadminUser={username}
-DadminPassword={pwd}
+
+The simulation to run is configured in the pom.xml
+
+	<plugin>
+		<groupId>io.gatling</groupId>
+		<artifactId>gatling-maven-plugin</artifactId>
+       <configuration>
+          <simulationsFolder>src/main/scala</simulationsFolder>
+          <simulationClass>org.apache.usergrid.simulations.AppSimulation</simulationClass>
+          <propagateSystemProperties>true</propagateSystemProperties>
+       </configuration>
+	</plugin>
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/11168eaf/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 76ca213..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
@@ -47,7 +47,9 @@ object Settings {
     numUsers = duration
   }
   if(numUsers % duration != 0){
-    throw new Exception(s"please use numUsers ($numUsers) that is evenly divisible by duration($duration)")
+    val message = s"please use numUsers ($numUsers) that is evenly divisible by duration($duration)"
+    println(message)
+    throw new Exception(message)
   }
   // Geolocation settings
   val centerLatitude:Double = 37.442348 // latitude of center point
@@ -56,8 +58,8 @@ object Settings {
   val geosearchRadius:Int = 8000 // search area in meters
 
   // Push Notification settings
-  val pushNotifier = System.getProperty("pushNotifier")
-  val pushProvider = System.getProperty("pushProvider")
+  val pushNotifier = if (System.getProperty("pushNotifier") != null)  System.getProperty("pushNotifier")
else "loadNotifier"
+  val pushProvider =  if (System.getProperty("pushProvider") != null)  System.getProperty("pushProvider")
 else "noop"
 
   val constantUsers:Int = Settings.numUsers/Settings.duration
   println(s"Will inject $constantUsers users per sec")


Mime
View raw message