usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [19/33] usergrid git commit: USERGRID-1044: add region to unlimited load test plus rename "auditRegion" to "usergridRegion" since it can be used for non-audit purposes
Date Tue, 20 Oct 2015 21:07:20 GMT
USERGRID-1044: add region to unlimited load test
plus rename "auditRegion" to "usergridRegion" since it can be used for
non-audit purposes


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

Branch: refs/heads/usergrid-1007-shiro-cache
Commit: 2f307a75066204a894bd68115518e29064ae56cc
Parents: 963a084
Author: Mike Dunker <mdunker@apigee.com>
Authored: Mon Oct 19 12:56:22 2015 -0700
Committer: Mike Dunker <mdunker@apigee.com>
Committed: Mon Oct 19 12:56:22 2015 -0700

----------------------------------------------------------------------
 .../runAuditVerifyCollectionEntities.sh         |  7 +++----
 stack/loadtests/runLoadEntitiesUnlimited.sh     |  4 +++-
 .../usergrid/enums/ConfigProperties.scala       |  6 +++---
 .../org/apache/usergrid/helpers/Headers.scala   |  4 ++--
 .../usergrid/scenarios/AuditScenarios.scala     | 10 ++++-----
 .../scenarios/EntityCollectionScenarios.scala   | 22 ++++++++++----------
 .../org/apache/usergrid/settings/Settings.scala |  2 +-
 stack/loadtests/testConfig.sh                   |  1 +
 8 files changed, 29 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/runAuditVerifyCollectionEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runAuditVerifyCollectionEntities.sh b/stack/loadtests/runAuditVerifyCollectionEntities.sh
index fa75505..695c9ee 100755
--- a/stack/loadtests/runAuditVerifyCollectionEntities.sh
+++ b/stack/loadtests/runAuditVerifyCollectionEntities.sh
@@ -28,18 +28,17 @@ if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
 #RETRY_COUNT=
 
 DELETE_AFTER_SUCCESSFUL_AUDIT=false
-AUDIT_REGION=
 
 die() { echo "$@" 1>&2 ; exit 1; }
 
-[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is $0 RAMP_USERS
RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME [DELETE_AFTER_SUCCESSFUL_AUDIT(true/false)[AUDIT_REGION]]]"
+[ "$#" -ge 3 ] || die "At least 3 arguments required, $# provided.  Example is $0 RAMP_USERS
RAMP_TIME(seconds) AUDIT_UUID_FILENAME [FAILED_UUID_FILENAME [DELETE_AFTER_SUCCESSFUL_AUDIT(true/false)[USERGRID_REGION]]]"
 
 RAMP_USERS="$1"
 RAMP_TIME="$2"
 AUDIT_UUID_FILENAME="$3"
 FAILED_UUID_FILENAME="$4"
 [ "$#" -ge 5 ] && DELETE_AFTER_SUCCESSFUL_AUDIT="$5"
-[ "$#" -ge 6 ] && AUDIT_REGION="$6"
+[ "$#" -ge 6 ] && USERGRID_REGION="$6"
 
 shift $#
 
@@ -65,6 +64,6 @@ mvn gatling:execute \
 -DfailedUuidFilename=${FAILED_UUID_FILENAME} \
 -DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -DdeleteAfterSuccessfulAudit=${DELETE_AFTER_SUCCESSFUL_AUDIT} \
--DauditRegion=${AUDIT_REGION} \
+-DusergridRegion=${USERGRID_REGION} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.AuditSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/runLoadEntitiesUnlimited.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runLoadEntitiesUnlimited.sh b/stack/loadtests/runLoadEntitiesUnlimited.sh
index 9222a57..11ca0a4 100755
--- a/stack/loadtests/runLoadEntitiesUnlimited.sh
+++ b/stack/loadtests/runLoadEntitiesUnlimited.sh
@@ -44,7 +44,7 @@ if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
 
 die() { echo "$@" 1>&2 ; exit 1; }
 
-[ "$#" -ge 2 ] || die "At least 2 arguments required, $# provided.  Example is $0 RAMP_USERS
RAMP_TIME(seconds) [UUID_FILENAME [ENTITY_SEED [ENTITY_WORKER_NUM [ENTITY_WORKER_COUNT]]]]"
+[ "$#" -ge 2 ] || die "At least 2 arguments required, $# provided.  Example is $0 RAMP_USERS
RAMP_TIME(seconds) [UUID_FILENAME [ENTITY_SEED [ENTITY_WORKER_NUM [ENTITY_WORKER_COUNT [USERGRID_REGION]]]]]"
 
 RAMP_USERS="$1"
 RAMP_TIME="$2"
@@ -52,6 +52,7 @@ RAMP_TIME="$2"
 [ "$#" -ge 4 ] && ENTITY_SEED="$4"
 [ "$#" -ge 5 ] && ENTITY_WORKER_NUM="$5"
 [ "$#" -ge 6 ] && ENTITY_WORKER_COUNT="$6"
+[ "$#" -ge 7 ] && USERGRID_REGION="$6"
 
 shift $#
 
@@ -97,5 +98,6 @@ mvn gatling:execute \
 -DrampTime=${RAMP_TIME}  \
 -DuuidFilename=${UUID_FILENAME} \
 -DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
+-DusergridRegion=${USERGRID_REGION} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ConfigProperties.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ConfigProperties.scala
b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ConfigProperties.scala
index d825bb6..f74222e 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ConfigProperties.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/ConfigProperties.scala
@@ -86,7 +86,7 @@ object ConfigProperties {
   val InterleavedWorkerFeed = "interleavedWorkerFeed"
   val NewCsvOnFlush = "newCsvOnFlush"
   val DeleteAfterSuccessfulAudit = "deleteAfterSuccessfulAudit"
-  val AuditRegion = "auditRegion";
+  val UsergridRegion = "usergridRegion";
 
   val Values = Seq(Org,App,AdminUser,AdminPassword,BaseUrl,AuthType,TokenType,SkipSetup,CreateOrg,CreateApp,LoadEntities,
     ScenarioType,RampUsers,ConstantUsersPerSec,ConstantUsersDuration,UserSeed,AppUser,AppUserPassword,NumEntities,
@@ -96,7 +96,7 @@ object ConfigProperties {
     UuidFilename,AuditUuidFilename,FailedUuidFilename,SandboxCollection,PurgeUsers,RetryCount,LaterThanTimestamp,
     EntityProgressCount,InjectionList,PrintFailedRequests,GetViaQuery,MultiPropertyPrefix,MultiPropertyCount,
     MultiPropertySizeInK,EntityNumberProperty,QueryParams,CsvFeedPattern,UnlimitedFeed,FlushCsv,InterleavedWorkerFeed,
-    NewCsvOnFlush,DeleteAfterSuccessfulAudit,AuditRegion)
+    NewCsvOnFlush,DeleteAfterSuccessfulAudit,UsergridRegion)
 
   def isValid(str: String): Boolean = {
     Values.contains(str)
@@ -170,7 +170,7 @@ object ConfigProperties {
         case InterleavedWorkerFeed => false
         case NewCsvOnFlush => false
         case DeleteAfterSuccessfulAudit => false
-        case AuditRegion => ""
+        case UsergridRegion => ""
       }
     } else {
       null

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Headers.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Headers.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Headers.scala
index ce9a168..863a12b 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Headers.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Headers.scala
@@ -62,8 +62,8 @@ object Headers {
   /**
   * Optional region header
   */
-  def auditRegionHeaders: Map[String, String] = {
-    if (Settings.auditRegion != "") Map( "UsergridRegion" -> Settings.auditRegion )
+  def usergridRegionHeaders: Map[String, String] = {
+    if (Settings.usergridRegion != "") Map( "UsergridRegion" -> Settings.usergridRegion
)
     else Map()
   }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
index be754f4..4743536 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/AuditScenarios.scala
@@ -58,7 +58,7 @@ object AuditScenarios {
     http("GET collections")
       .get(collectionGetUrl(false))
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200),extractAuditEntities(SessionVarCollectionEntities),maybeExtractCursor(SessionVarCursor)))
       .foreach("${" + SessionVarCollectionEntities + "}", "singleResult") {
         exec(session => {
@@ -76,7 +76,7 @@ object AuditScenarios {
     http("GET collections")
       .get(collectionGetUrl(true))
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200),extractAuditEntities(SessionVarCollectionEntities),maybeExtractCursor(SessionVarCursor)))
       .foreach("${" + SessionVarCollectionEntities + "}", "singleResult") {
         exec(session => {
@@ -120,7 +120,7 @@ object AuditScenarios {
     http("DELETE audited entity")
       .delete("/${collectionName}/${uuid}")
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(extractEntityUuid(SessionVarDeletedUuid)))
       .exec(session => {
         val uuid = session(SessionVarDeletedUuid).as[String]
@@ -139,7 +139,7 @@ object AuditScenarios {
     http("GET collection entity direct")
       .get("/${collectionName}/${uuid}")
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check()
       .check(status.in(Seq(200,404)),extractAuditEntities(SessionVarCollectionEntities),
         extractEntityUuid(SessionVarEntityUuid),extractEntityName(SessionVarEntityName)))
@@ -193,7 +193,7 @@ object AuditScenarios {
     http("GET collection entity")
       .get("/${collectionName}?ql=uuid=${uuid}")
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200),jsonPath("$.count").optional.saveAs("count"),
         extractAuditEntities(SessionVarCollectionEntities),
         extractEntityUuid(SessionVarEntityUuid),extractEntityName(SessionVarEntityName)))

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityCollectionScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityCollectionScenarios.scala
b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityCollectionScenarios.scala
index bc3cf8c..f717f16 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityCollectionScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityCollectionScenarios.scala
@@ -73,7 +73,7 @@ object EntityCollectionScenarios {
     http("GET entities")
       .get(entityGetUrl(false))
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200), maybeExtractCursor(SessionVarCursor))
   )
 
@@ -81,7 +81,7 @@ object EntityCollectionScenarios {
     http("GET entities")
       .get(entityGetUrl(true))
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200), maybeExtractCursor(SessionVarCursor))
   )
 
@@ -112,7 +112,7 @@ object EntityCollectionScenarios {
     http("GET entity by name (anonymous)")
       .get(randomEntityNameUrl())
       .headers(Headers.authAnonymous)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200))
   )
 
@@ -120,7 +120,7 @@ object EntityCollectionScenarios {
     http("GET entity by name (token)")
       .get(randomEntityNameUrl())
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200))
   )
 
@@ -157,7 +157,7 @@ object EntityCollectionScenarios {
       .get("/" + Settings.collection + "/${uuid}")
       .queryParamMap(Settings.queryParamMap)
       .headers(Headers.authAnonymous)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200))
   )
 
@@ -166,7 +166,7 @@ object EntityCollectionScenarios {
       .get("/" + Settings.collection + "/${uuid}")
       .queryParamMap(Settings.queryParamMap)
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .check(status.is(200))
   )
 
@@ -213,7 +213,7 @@ object EntityCollectionScenarios {
       exec(http("POST load entity")
         .post(_ => "/" + Settings.collection)
         .headers(Headers.authToken)
-        .headers(Headers.auditRegionHeaders)
+        .headers(Headers.usergridRegionHeaders)
         .body(StringBody("""${entity}"""))
         // 200 for success, 400 if already exists
         .check(status.in(Seq(200)), extractEntityUuid(SessionVarUuid), extractEntityModified(SessionVarModified)))
@@ -251,7 +251,7 @@ object EntityCollectionScenarios {
     http("DELETE entity")
       .delete("""${entityUrl}""")
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       // 200 for success, 404 if doesn't exist
       .check(status.in(Seq(200)))
   )
@@ -279,7 +279,7 @@ object EntityCollectionScenarios {
     http("UPDATE entity")
       .put("""${entityUrl}""")
       .headers(Headers.authToken)
-      .headers(Headers.auditRegionHeaders)
+      .headers(Headers.usergridRegionHeaders)
       .body(StringBody(Settings.updateBody))
       // 200 for success, 404 if doesn't exist
       .check(status.in(Seq(200)))
@@ -308,7 +308,7 @@ object EntityCollectionScenarios {
         .get("/" + Settings.collection + "/${entityName}")
         .queryParamMap(Settings.queryParamMap)
         .headers(Headers.authAnonymous)
-        .headers(Headers.auditRegionHeaders)
+        .headers(Headers.usergridRegionHeaders)
         .check(status.is(200), extractEntityUuid(SessionVarUuid), extractEntityModified(SessionVarModified)))
         .exec(session => {
           val uuid = session(SessionVarUuid).as[String]
@@ -327,7 +327,7 @@ object EntityCollectionScenarios {
         .get("/" + Settings.collection + "/${entityName}")
         .queryParamMap(Settings.queryParamMap)
         .headers(Headers.authToken)
-        .headers(Headers.auditRegionHeaders)
+        .headers(Headers.usergridRegionHeaders)
         .check(status.is(200), extractEntityUuid(SessionVarUuid), extractEntityModified(SessionVarModified)))
         .exec(session => {
           val uuid = session(SessionVarUuid).as[String]

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/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 b9ba86d..2ecc3e3 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
@@ -187,7 +187,7 @@ object Settings {
   val interleavedWorkerFeed:Boolean = if (unlimitedFeed) true else initBoolSetting(ConfigProperties.InterleavedWorkerFeed)
   val newCsvOnFlush:Boolean = initBoolSetting(ConfigProperties.NewCsvOnFlush)
   val deleteAfterSuccessfulAudit:Boolean = initBoolSetting(ConfigProperties.DeleteAfterSuccessfulAudit)
-  val auditRegion = initStrSetting(ConfigProperties.AuditRegion)
+  val usergridRegion = initStrSetting(ConfigProperties.UsergridRegion)
 
   val multiPropertyPrefix = initStrSetting(ConfigProperties.MultiPropertyPrefix)
   val multiPropertyCount:Int = initIntSetting(ConfigProperties.MultiPropertyCount)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2f307a75/stack/loadtests/testConfig.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/testConfig.sh b/stack/loadtests/testConfig.sh
index 466d8c9..59f64e1 100755
--- a/stack/loadtests/testConfig.sh
+++ b/stack/loadtests/testConfig.sh
@@ -64,3 +64,4 @@ GET_VIA_QUERY=false
 QUERY_PARAMS=
 
 FLUSH_CSV=10000
+USERGRID_REGION=


Mime
View raw message