You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/08/28 18:04:54 UTC

[1/5] usergrid git commit: 1. Update to version 2.1.7 of gatling (including Scala version 2.11.7) 2. Add audit script to get all collections in all apps for an org. 3. Add a flag to control whether failed requests are printed or not. 4. Add test allowing

Repository: usergrid
Updated Branches:
  refs/heads/two-dot-o-dev fd18f1f14 -> 88b64e435


1. Update to version 2.1.7 of gatling (including Scala version 2.11.7)
2. Add audit script to get all collections in all apps for an org.
3. Add a flag to control whether failed requests are printed or not.
4. Add test allowing creation of large entities. Can specify entities with m properties each containing strings with n kb characters.
5. Add test allowing query-based retrievals by random name.


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

Branch: refs/heads/two-dot-o-dev
Commit: a3e7b7eea24dbb771505f21d0ef0ecb93c34fb7d
Parents: 72016ea
Author: Mike Dunker <mi...@calbears.net>
Authored: Fri Aug 21 17:06:44 2015 -0700
Committer: Mike Dunker <mi...@calbears.net>
Committed: Fri Aug 21 17:06:44 2015 -0700

----------------------------------------------------------------------
 stack/loadtests/pom.xml                         |  13 +--
 .../runAuditGetAllAppCollectionEntities.sh      |  68 ++++++++++++
 .../loadtests/runAuditGetCollectionEntities.sh  |   1 +
 .../runAuditVerifyCollectionEntities.sh         |   1 +
 stack/loadtests/runCollectionQueryTest.sh       |   1 +
 .../runCustomInjectRandomEntityByUuidTest.sh    |   1 +
 stack/loadtests/runDeleteEntities.sh            |   1 +
 .../loadtests/runGetEntitiesByNameSequential.sh |   1 +
 stack/loadtests/runLoadEntities.sh              |   1 +
 .../loadtests/runLoadLargeMultiFieldEntities.sh | 107 +++++++++++++++++++
 stack/loadtests/runLoadNoNameEntities.sh        |   1 +
 stack/loadtests/runLoadSortableEntities.sh      |   3 +-
 .../loadtests/runRandomEntityByNameQueryTest.sh |  91 ++++++++++++++++
 stack/loadtests/runRandomEntityByNameTest.sh    |   1 +
 stack/loadtests/runRandomEntityByUuidTest.sh    |   1 +
 stack/loadtests/runUpdateEntities.sh            |   1 +
 .../datagenerators/EntityDataGenerator.scala    |  19 +++-
 .../datagenerators/FeederGenerator.scala        |   8 +-
 .../usergrid/enums/ConfigProperties.scala       |  15 ++-
 .../org/apache/usergrid/enums/EntityType.scala  |   3 +-
 .../org/apache/usergrid/helpers/Setup.scala     |  39 ++++++-
 .../org/apache/usergrid/helpers/Utils.scala     |   3 +-
 .../usergrid/scenarios/AuditScenarios.scala     |  19 ++--
 .../org/apache/usergrid/settings/Settings.scala |  44 +++++++-
 .../usergrid/simulations/AuditSimulation.scala  |   6 +-
 .../simulations/ConfigurableSimulation.scala    |   2 +-
 .../simulations/CustomInjectionSimulation.scala |   2 +-
 .../simulations/deprecated/AppSimulation.scala  |   2 +-
 .../deprecated/ConnectionsSimulation.scala      |   2 +-
 .../deprecated/DeleteUsersSimulation.scala      |   2 +-
 .../deprecated/GetEntitySimulation.scala        |   2 +-
 .../deprecated/GetUserPagesSimulation.scala     |   2 +-
 .../deprecated/GetUsersSimulation.scala         |   2 +-
 .../deprecated/PostCustomEntitySimulation.scala |   2 +-
 .../deprecated/PostUsersSimulation.scala        |   2 +-
 .../PushNotificationTargetUserSimulation.scala  |   2 +-
 .../deprecated/PutCustomEntitySimulation.scala  |   2 +-
 .../deprecated/PutUsersSimulation.scala         |   2 +-
 .../deprecated/SetupSimulation.scala            |   2 +-
 stack/loadtests/src/test/resources/gatling.conf |   6 +-
 .../src/test/resources/logback-test.xml         |   2 +-
 stack/loadtests/src/test/resources/logback.xml  |   2 +-
 stack/loadtests/src/test/scala/Engine.scala     |   5 +-
 .../src/test/scala/IDEPathHelper.scala          |  13 +--
 stack/loadtests/src/test/scala/Recorder.scala   |   8 +-
 stack/loadtests/testConfig.sh                   |   4 +
 46 files changed, 452 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/pom.xml
----------------------------------------------------------------------
diff --git a/stack/loadtests/pom.xml b/stack/loadtests/pom.xml
index 6605602..b94dfdd 100644
--- a/stack/loadtests/pom.xml
+++ b/stack/loadtests/pom.xml
@@ -48,15 +48,16 @@
 
 	<properties>
 		<maven.compiler.source>1.7</maven.compiler.source>
-		<maven.compiler.target>1.6</maven.compiler.target>
-		<scala.version>2.10.4</scala.version>
+		<maven.compiler.target>1.7</maven.compiler.target>
+		<scala.version>2.11.7</scala.version>
 		<encoding>UTF-8</encoding>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-		<gatling.version>2.0.3</gatling.version>
-	<gatling.plugin.version>2.0.0</gatling.plugin.version>
-		<gatling-highcharts.version>2.0.3</gatling-highcharts.version>
+		<gatling.version>2.1.7</gatling.version>
+        <gatling.plugin.version>2.1.7</gatling.plugin.version>
+		<gatling-highcharts.version>2.1.7</gatling-highcharts.version>
 
-		<scala-maven-plugin.version>3.1.6</scala-maven-plugin.version>
+		<scala-maven-plugin.version>3.2.2</scala-maven-plugin.version>
 	</properties>
 
 	<dependencyManagement>

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runAuditGetAllAppCollectionEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runAuditGetAllAppCollectionEntities.sh b/stack/loadtests/runAuditGetAllAppCollectionEntities.sh
new file mode 100755
index 0000000..c8a30a3
--- /dev/null
+++ b/stack/loadtests/runAuditGetAllAppCollectionEntities.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#               http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/testConfig.sh"
+
+# from testConfig.sh
+#URL=
+#ADMIN_USER=
+#ADMIN_PASSWORD=
+#ORG=
+#AUTH_TYPE=
+#TOKEN_TYPE=
+#SEARCH_QUERY=
+#SEARCH_LIMIT=
+#LATER_THAN_TIMESTAMP=  #may be overridden on command line
+#ENTITY_PROGRESS_COUNT=
+
+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 [LATER_THAN_TIMESTAMP(ms)]"
+RAMP_USERS="$1"
+RAMP_TIME="$2"
+AUDIT_UUID_FILENAME="$3"
+[ "$#" -ge 4 ] && LATER_THAN_TIMESTAMP="$4"
+
+shift 3
+
+SCENARIO_TYPE=auditGetCollectionEntities
+APP="*"
+
+#Compile everything
+mvn compile
+
+#Execute the test
+mvn gatling:execute \
+-DbaseUrl=${URL} \
+-DadminUser=${ADMIN_USER}  \
+-DadminPassword=${ADMIN_PASSWORD}  \
+-Dorg=${ORG} \
+-Dapp=${APP} \
+-DauthType=${AUTH_TYPE} \
+-DtokenType=${TOKEN_TYPE} \
+-DsearchQuery=${SEARCH_QUERY} \
+-DsearchLimit=${SEARCH_LIMIT} \
+-DlaterThanTimestamp=${LATER_THAN_TIMESTAMP} \
+-DentityProgressCount=${ENTITY_PROGRESS_COUNT} \
+-DscenarioType=${SCENARIO_TYPE} \
+-DrampUsers=${RAMP_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DauditUuidFilename=${AUDIT_UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.AuditSimulation
+
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runAuditGetCollectionEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runAuditGetCollectionEntities.sh b/stack/loadtests/runAuditGetCollectionEntities.sh
index c47b88d..2ddc62b 100755
--- a/stack/loadtests/runAuditGetCollectionEntities.sh
+++ b/stack/loadtests/runAuditGetCollectionEntities.sh
@@ -62,6 +62,7 @@ mvn gatling:execute \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
 -DauditUuidFilename=${AUDIT_UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.AuditSimulation
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runAuditVerifyCollectionEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runAuditVerifyCollectionEntities.sh b/stack/loadtests/runAuditVerifyCollectionEntities.sh
index 877e0ad..6d963f3 100755
--- a/stack/loadtests/runAuditVerifyCollectionEntities.sh
+++ b/stack/loadtests/runAuditVerifyCollectionEntities.sh
@@ -59,5 +59,6 @@ mvn gatling:execute \
 -DrampTime=${RAMP_TIME}  \
 -DauditUuidFilename=${AUDIT_UUID_FILENAME} \
 -DfailedUuidFilename=${FAILED_UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.AuditSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runCollectionQueryTest.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runCollectionQueryTest.sh b/stack/loadtests/runCollectionQueryTest.sh
index 40b63f8..7e5ad88 100755
--- a/stack/loadtests/runCollectionQueryTest.sh
+++ b/stack/loadtests/runCollectionQueryTest.sh
@@ -83,5 +83,6 @@ mvn gatling:execute -Dorg=usergrid \
 -DscenarioType=${SCENARIO_TYPE} \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runCustomInjectRandomEntityByUuidTest.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runCustomInjectRandomEntityByUuidTest.sh b/stack/loadtests/runCustomInjectRandomEntityByUuidTest.sh
index 3164a9d..8c240e9 100755
--- a/stack/loadtests/runCustomInjectRandomEntityByUuidTest.sh
+++ b/stack/loadtests/runCustomInjectRandomEntityByUuidTest.sh
@@ -103,5 +103,6 @@ mvn gatling:execute \
 -DscenarioType=${SCENARIO_TYPE} \
 -DuuidFilename=${UUID_FILENAME} \
 -DinjectionList=${INJECTION_LIST} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.CustomInjectionSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runDeleteEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runDeleteEntities.sh b/stack/loadtests/runDeleteEntities.sh
index 0d69bab..2013e89 100755
--- a/stack/loadtests/runDeleteEntities.sh
+++ b/stack/loadtests/runDeleteEntities.sh
@@ -84,5 +84,6 @@ mvn gatling:execute \
 -DscenarioType=${SCENARIO_TYPE} \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runGetEntitiesByNameSequential.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runGetEntitiesByNameSequential.sh b/stack/loadtests/runGetEntitiesByNameSequential.sh
index f7b36b1..4003853 100755
--- a/stack/loadtests/runGetEntitiesByNameSequential.sh
+++ b/stack/loadtests/runGetEntitiesByNameSequential.sh
@@ -86,6 +86,7 @@ mvn gatling:execute \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
 -DuuidFilename=${UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runLoadEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runLoadEntities.sh b/stack/loadtests/runLoadEntities.sh
index 82045bb..b4afcd5 100755
--- a/stack/loadtests/runLoadEntities.sh
+++ b/stack/loadtests/runLoadEntities.sh
@@ -92,5 +92,6 @@ mvn gatling:execute \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
 -DuuidFilename=${UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runLoadLargeMultiFieldEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runLoadLargeMultiFieldEntities.sh b/stack/loadtests/runLoadLargeMultiFieldEntities.sh
new file mode 100755
index 0000000..a2af54c
--- /dev/null
+++ b/stack/loadtests/runLoadLargeMultiFieldEntities.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#               http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/testConfig.sh"
+
+# from testConfig.sh
+#URL=
+#ADMIN_USER=
+#ADMIN_PASSWORD=
+#ENTITY_WORKER_NUM=  #may be overridden on command line
+#ENTITY_WORKER_COUNT=  #may be overridden on command line
+#ORG=
+#APP=
+#AUTH_TYPE=
+#TOKEN_TYPE=
+#CREATE_ORG=
+#CREATE_APP=
+#SANDBOX_COLLECTION=
+#NUM_ENTITIES=  #may be overridden on command line
+#SKIP_SETUP=
+#COLLECTION=
+#ENTITY_SEED=  #may be overridden on command line
+#RETRY_COUNT=
+#ENTITY_PROGRESS_COUNT=
+#CONSTANT_USERS_PER_SEC=
+#CONSTANT_USERS_DURATION=
+
+
+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 [NUM_ENTITIES [ENTITY_SEED [ENTITY_WORKER_NUM [ENTITY_WORKER_COUNT]]]]]"
+
+RAMP_USERS="$1"
+RAMP_TIME="$2"
+[ "$#" -ge 3 ] && UUID_FILENAME="$3"
+[ "$#" -ge 4 ] && NUM_ENTITIES="$4"
+[ "$#" -ge 5 ] && ENTITY_SEED="$5"
+[ "$#" -ge 6 ] && ENTITY_WORKER_NUM="$6"
+[ "$#" -ge 7 ] && ENTITY_WORKER_COUNT="$7"
+
+shift $#
+
+SCENARIO_TYPE=loadEntities
+ENTITY_TYPE=largeMultiField
+ENTITY_PREFIX=multi
+
+MULTI_PROPERTY_PREFIX=prop
+MULTI_PROPERTY_COUNT=10
+MULTI_PROPERTY_SIZE_IN_K=1
+ENTITY_NUMBER_PROPERTY=entityNum
+
+# don't load entities as part of setup (loading entities is the point of the test)
+LOAD_ENTITIES=false
+
+#Compile everything
+mvn compile
+
+#Execute the test
+mvn gatling:execute \
+-DbaseUrl=${URL} \
+-DadminUser=${ADMIN_USER}  \
+-DadminPassword=${ADMIN_PASSWORD}  \
+-DentityWorkerNum=${ENTITY_WORKER_NUM} \
+-DentityWorkerCount=${ENTITY_WORKER_COUNT} \
+-Dorg=${ORG} \
+-Dapp=${APP} \
+-DauthType=${AUTH_TYPE} \
+-DtokenType=${TOKEN_TYPE} \
+-DcreateOrg=${CREATE_ORG} \
+-DcreateApp=${CREATE_APP} \
+-DsandboxCollection=${SANDBOX_COLLECTION} \
+-DnumEntities=${NUM_ENTITIES} \
+-DskipSetup=${SKIP_SETUP} \
+-Dcollection=${COLLECTION} \
+-DentitySeed=${ENTITY_SEED} \
+-DretryCount=${RETRY_COUNT} \
+-DentityProgressCount=${ENTITY_PROGRESS_COUNT} \
+-DconstantUsersPerSec=${CONSTANT_USERS_PER_SEC}    \
+-DconstantUsersDuration=${CONSTANT_USERS_DURATION}    \
+-DscenarioType=${SCENARIO_TYPE} \
+-DentityType=${ENTITY_TYPE} \
+-DentityPrefix=${ENTITY_PREFIX} \
+-DloadEntities=${LOAD_ENTITIES} \
+-DrampUsers=${RAMP_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DuuidFilename=${UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
+-DmultiPropertyPrefix=${MULTI_PROPERTY_PREFIX} \
+-DmultiPropertyCount=${MULTI_PROPERTY_COUNT} \
+-DmultiPropertySizeInK=${MULTI_PROPERTY_SIZE_IN_K} \
+-DentityNumberProperty=${ENTITY_NUMBER_PROPERTY} \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runLoadNoNameEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runLoadNoNameEntities.sh b/stack/loadtests/runLoadNoNameEntities.sh
index 4acf1cc..8e08221 100755
--- a/stack/loadtests/runLoadNoNameEntities.sh
+++ b/stack/loadtests/runLoadNoNameEntities.sh
@@ -93,5 +93,6 @@ mvn gatling:execute \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
 -DuuidFilename=${UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runLoadSortableEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runLoadSortableEntities.sh b/stack/loadtests/runLoadSortableEntities.sh
index 94f2a9a..cf87cb6 100755
--- a/stack/loadtests/runLoadSortableEntities.sh
+++ b/stack/loadtests/runLoadSortableEntities.sh
@@ -42,7 +42,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 URL RAMP_USERS RAMP_TIME(seconds) [UUID_FILENAME [NUM_ENTITIES [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 [NUM_ENTITIES [ENTITY_SEED [ENTITY_WORKER_NUM [ENTITY_WORKER_COUNT]]]]]"
 
 RAMP_USERS="$1"
 RAMP_TIME="$2"
@@ -93,5 +93,6 @@ mvn gatling:execute \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
 -DuuidFilename=${UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runRandomEntityByNameQueryTest.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runRandomEntityByNameQueryTest.sh b/stack/loadtests/runRandomEntityByNameQueryTest.sh
new file mode 100755
index 0000000..bb42677
--- /dev/null
+++ b/stack/loadtests/runRandomEntityByNameQueryTest.sh
@@ -0,0 +1,91 @@
+#!/bin/bash
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#               http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/testConfig.sh"
+
+# from testConfig.sh
+#URL=
+#ADMIN_USER=
+#ADMIN_PASSWORD=
+#ORG=
+#APP=
+#AUTH_TYPE=
+#TOKEN_TYPE=
+#CREATE_ORG=
+#CREATE_APP=
+#LOAD_ENTITIES=
+#SANDBOX_COLLECTION=
+#NUM_ENTITIES=  #may be overridden on command line
+#SKIP_SETUP=
+#COLLECTION=
+#ENTITY_PREFIX=
+#ENTITY_SEED=  #may be overridden on command line
+#RETRY_COUNT=
+#END_CONDITION_TYPE=
+#END_MINUTES=
+#END_REQUEST_COUNT=
+#CONSTANT_USERS_PER_SEC=
+#CONSTANT_USERS_DURATION=
+
+die() { echo "$@" 1>&2 ; exit 1; }
+
+[ "$#" -ge 2 ] || die "At least 2 arguments required, $# provided.  Example is $0 RAMP_USERS RAMP_TIME(seconds) [NUM_ENTITIES [ENTITY_SEED]]"
+
+RAMP_USERS="$1"
+RAMP_TIME="$2"
+[ "$#" -ge 3 ] && NUM_ENTITIES="$3"
+[ "$#" -ge 4 ] && ENTITY_SEED="$4"
+
+shift $#
+
+SCENARIO_TYPE=nameRandomInfinite
+GET_VIA_QUERY=true
+
+#Compile everything
+mvn compile
+
+#Execute the test
+mvn gatling:execute \
+-DbaseUrl=${URL} \
+-DadminUser=${ADMIN_USER}  \
+-DadminPassword=${ADMIN_PASSWORD}  \
+-Dorg=${ORG} \
+-Dapp=${APP} \
+-DauthType=${AUTH_TYPE} \
+-DtokenType=${TOKEN_TYPE} \
+-DcreateOrg=${CREATE_ORG} \
+-DcreateApp=${CREATE_APP} \
+-DloadEntities=${LOAD_ENTITIES} \
+-DsandboxCollection=${SANDBOX_COLLECTION} \
+-DnumEntities=${NUM_ENTITIES} \
+-DskipSetup=${SKIP_SETUP} \
+-Dcollection=${COLLECTION} \
+-DentityPrefix=${ENTITY_PREFIX} \
+-DentitySeed=${ENTITY_SEED} \
+-DretryCount=${RETRY_COUNT} \
+-DendConditionType=${END_CONDITION_TYPE} \
+-DendMinutes=${END_MINUTES} \
+-DendRequestCount=${END_REQUEST_COUNT} \
+-DconstantUsersPerSec=${CONSTANT_USERS_PER_SEC}    \
+-DconstantUsersDuration=${CONSTANT_USERS_DURATION}    \
+-DscenarioType=${SCENARIO_TYPE} \
+-DrampUsers=${RAMP_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
+-DgetViaQuery=${GET_VIA_QUERY} \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runRandomEntityByNameTest.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runRandomEntityByNameTest.sh b/stack/loadtests/runRandomEntityByNameTest.sh
index 85a6457..35be011 100755
--- a/stack/loadtests/runRandomEntityByNameTest.sh
+++ b/stack/loadtests/runRandomEntityByNameTest.sh
@@ -84,5 +84,6 @@ mvn gatling:execute \
 -DscenarioType=${SCENARIO_TYPE} \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runRandomEntityByUuidTest.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runRandomEntityByUuidTest.sh b/stack/loadtests/runRandomEntityByUuidTest.sh
index 261b256..b224615 100755
--- a/stack/loadtests/runRandomEntityByUuidTest.sh
+++ b/stack/loadtests/runRandomEntityByUuidTest.sh
@@ -80,5 +80,6 @@ mvn gatling:execute \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
 -DuuidFilename=${UUID_FILENAME} \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/runUpdateEntities.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runUpdateEntities.sh b/stack/loadtests/runUpdateEntities.sh
index b8265d2..579d0c7 100755
--- a/stack/loadtests/runUpdateEntities.sh
+++ b/stack/loadtests/runUpdateEntities.sh
@@ -86,5 +86,6 @@ mvn gatling:execute \
 -DupdateProperty=${UPDATE_PROPERTY} \
 -DrampUsers=${RAMP_USERS}  \
 -DrampTime=${RAMP_TIME}  \
+-DprintFailedRequests=${PRINT_FAILED_REQUESTS} \
 -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/EntityDataGenerator.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/EntityDataGenerator.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/EntityDataGenerator.scala
index 5b5c612..326a319 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/EntityDataGenerator.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/EntityDataGenerator.scala
@@ -18,6 +18,7 @@ package org.apache.usergrid.datagenerators
 
 import org.apache.usergrid.enums.EntityType
 import org.apache.usergrid.helpers.Utils
+import org.apache.usergrid.settings.Settings
 
 import scala.collection.mutable.ArrayBuffer
 import scala.util.parsing.json.JSONObject
@@ -107,6 +108,21 @@ object EntityDataGenerator {
        new JSONObject(Map("sortField" -> Utils.generateRandomInt(1,10000000))).toString()
    }
 
+  val pirate1KString = "Yarrrrrrrrrrrrrrrr! Blimey! Avast ye scurvy dog! Dead men tell no tales. Hang him from the yardarm! Heave ho! Run a shot across the bow. Yo-ho-ho and a bottle of rum. Heave ho ye scallywag, or ye shall walk the plank! Weigh anchor and hoist the mizzen! Thar she blows! Shiver me timbers! Splice the mainbrace! Keelhaul the hornswaggler! Raise the Jolly Roger! Feed him to the fish! You fight like a dairy farmer. How appropriate, you fight like a cow. Batten down the hatches! Blow the man down! Swab the deck! Ahoy, matey! I'll crush ye barnacles! Fetch me grog! Gangway! Arrr, he's gone to Davy Jones's Locker. He be three sheets to the wind. Yo-ho me hearties! Prepare to be boarded! All your pieces of eight, else ye meet me cat o'nine tails! Bring 'er alongside! The rougher the seas, the smoother we sail! It's more fun to be a pirate than to join the navy. The beatings will continue until morale improves! Fifteen men on the dead man's chest! I be the captain of th
 is ship -- swab the decks! "
+
+  def generateLargeMultiFieldEntity(name: String = null, entityNum: Int = 0): String = {
+
+    val objectMap:scala.collection.mutable.HashMap[String,Any] = scala.collection.mutable.HashMap.empty[String,Any]
+    if (name != null) objectMap += ("name" -> name)
+    if (Settings.entityNumberProperty != null && Settings.entityNumberProperty != "") objectMap += (Settings.entityNumberProperty -> entityNum)
+    val fieldValue = pirate1KString * Settings.multiPropertySizeInK
+    for (i <- 1 to Settings.multiPropertyCount) {
+      objectMap += (s"${Settings.multiPropertyPrefix}$i" -> fieldValue)
+    }
+
+    new JSONObject(objectMap.toMap).toString()
+  }
+
    def generateBasicEntity(name: String = null): String = {
 
      val nameKey = if (name != null) "name" else "noname"
@@ -134,12 +150,13 @@ object EntityDataGenerator {
      new JSONObject(entity).toString()
    }
 
-   def generateEntity(entityType: String = EntityType.Basic, entityName: String = null): String = {
+   def generateEntity(entityType: String = EntityType.Basic, entityName: String = null, entityNum: Int = 0): String = {
 
      entityType match {
        case EntityType.Trivial => generateTrivialEntity(entityName)
        case EntityType.TrivialSortable => generateTrivialSortableEntity(entityName)
        case EntityType.Basic => generateBasicEntity(entityName)
+       case EntityType.LargeMultiField => generateLargeMultiFieldEntity(entityName, entityNum)
      }
    }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
index 9546e2d..ca93fdc 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators/FeederGenerator.scala
@@ -199,7 +199,7 @@ object FeederGenerator {
    //val entityFeeder = Iterator.from(1).take(numEntities).map(i=>Map("entity" -> EntityDataGenerator.generateNamedCustomEntityJSONString(prefix.concat(i.toString()))))
    var entityArray: ArrayBuffer[String] = new ArrayBuffer[String]
    for (i <- seed to numEntities+seed-1) {
-     var entity = EntityDataGenerator.generateEntity(entityType, prefix.concat(i.toString))
+     var entity = EntityDataGenerator.generateEntity(entityType, prefix.concat(i.toString), i)
      entityArray += entity
    }
 
@@ -223,7 +223,7 @@ object FeederGenerator {
      val seededVal = i + seed
      val noPrefix = prefix == null || prefix == ""
      val entityName = if (noPrefix) seededVal.toString else prefix.concat(seededVal.toString)
-     val entity = EntityDataGenerator.generateEntity(entityType, if (noPrefix) null else entityName)
+     val entity = EntityDataGenerator.generateEntity(entityType, if (noPrefix) null else entityName, seededVal)
      val entityUrl = Settings.baseCollectionUrl + "/" + entityName
      val validEntity = if (i >= numEntities) "no" else "yes"
 
@@ -234,7 +234,7 @@ object FeederGenerator {
  }
 
   def collectionNameFeeder: Feeder[String] = new Feeder[String] {
-    val list: List[String] = Setup.getCollectionsList
+    val list: List[String] = if (Settings.allApps) Setup.getApplicationCollectionsList else Setup.getCollectionsList()
     var counter = new AtomicInteger(0)
 
     override def hasNext: Boolean = true
@@ -283,7 +283,7 @@ object FeederGenerator {
   }
 
  def generateCustomEntityInfiniteFeeder(seed: Int = Settings.entitySeed, entityType: String = Settings.entityType, prefix: String = Settings.entityPrefix): Iterator[String] = {
-   Iterator.from(seed).map(i=>EntityDataGenerator.generateEntity(entityType, if (prefix == null || prefix == "") null else prefix.concat(i.toString)))
+   Iterator.from(seed).map(i=>EntityDataGenerator.generateEntity(entityType, if (prefix == null || prefix == "") null else prefix.concat(i.toString), i))
  }
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/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 230f58b..8a4fd53 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
@@ -75,6 +75,12 @@ object ConfigProperties {
   val LaterThanTimestamp = "laterThanTimestamp"
   val EntityProgressCount = "entityProgressCount"
   val InjectionList = "injectionList"
+  val PrintFailedRequests = "printFailedRequests"
+  val GetViaQuery = "getViaQuery"
+  val MultiPropertyPrefix = "multiPropertyPrefix"
+  val MultiPropertyCount = "multiPropertyCount"
+  val MultiPropertySizeInK = "multiPropertySizeInK"
+  val EntityNumberProperty = "entityNumberProperty"
 
   val Values = Seq(Org,App,AdminUser,AdminPassword,BaseUrl,AuthType,TokenType,SkipSetup,CreateOrg,CreateApp,LoadEntities,
     ScenarioType,RampUsers,ConstantUsersPerSec,ConstantUsersDuration,UserSeed,AppUser,AppUserPassword,NumEntities,
@@ -82,7 +88,8 @@ object ConfigProperties {
     EntityType,EntitySeed,SearchLimit,SearchQuery,EndConditionType,EndMinutes,EndRequestCount,OrgCreationUsername,
     OrgCreationName,OrgCreationEmail,OrgCreationPassword,UpdateProperty,UpdateValue,EntityWorkerCount,EntityWorkerNum,
     UuidFilename,AuditUuidFilename,FailedUuidFilename,SandboxCollection,PurgeUsers,RetryCount,LaterThanTimestamp,
-    EntityProgressCount,InjectionList)
+    EntityProgressCount,InjectionList,PrintFailedRequests,GetViaQuery,MultiPropertyPrefix,MultiPropertyCount,
+    MultiPropertySizeInK,EntityNumberProperty)
 
   def isValid(str: String): Boolean = {
     Values.contains(str)
@@ -145,6 +152,12 @@ object ConfigProperties {
         case LaterThanTimestamp => 0L
         case EntityProgressCount => 10000L
         case InjectionList => "rampUsers(10,60)"
+        case PrintFailedRequests => true
+        case GetViaQuery => false
+        case MultiPropertyPrefix => "prop"
+        case MultiPropertyCount => 1
+        case MultiPropertySizeInK => 1
+        case EntityNumberProperty => ""
       }
     } else {
       null

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/enums/EntityType.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/EntityType.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/EntityType.scala
index 505dd4f..277cd04 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/enums/EntityType.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/enums/EntityType.scala
@@ -20,8 +20,9 @@ object EntityType {
   val Trivial = "trivial"
   val TrivialSortable = "trivialSortable"
   val Basic = "basic"
+  val LargeMultiField = "largeMultiField"
 
-  val Values = Seq(Trivial,TrivialSortable,Basic)
+  val Values = Seq(Trivial,TrivialSortable,Basic,LargeMultiField)
 
   def isValid(str: String): Boolean = {
     Values.contains(str)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
index 37428ac..8380ceb 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Setup.scala
@@ -111,15 +111,18 @@ object Setup {
     statusCode
   }
 
-  def getCollectionsList: List[String] = {
+  def getCollectionsList(org:String = Settings.org, app:String = Settings.app): List[String] = {
+    val url = s"${Settings.baseUrl}/$org/$app"
+    println(s"url: $url")
     val appInfoGet = client
-      .prepareGet(s"${Settings.baseAppUrl}")
+      .prepareGet(url)
       .setHeader("Cache-Control", "no-cache")
       .setHeader("Accept", "application/json; charset=UTF-8")
       .setHeader("Authorization", s"Bearer $getManagementToken")
       .build()
 
     val getResponse = client.executeRequest(appInfoGet).get()
+    println(s"responseBody\n: ${getResponse.getResponseBody}\n")
     val topLevel: Map[String, Any] = JSON.parseFull(getResponse.getResponseBody).get.asInstanceOf[Map[String,Any]]
     val entities: List[Map[String, Any]] = topLevel("entities").asInstanceOf[List[Map[String,Any]]]
     //println(s"entities: $entities")
@@ -130,12 +133,40 @@ object Setup {
     val collections: Map[String, Any] = metadata("collections").asInstanceOf[Map[String, Any]]
     //println(s"collections: $collections")
 
-    val collectionsList: List[String] = (collections map { case (key, value) => key }).toList
-    //println(collectionsList)
+    val collectionsList: List[String] = (collections map { case (key, value) => s"$app/$key" }).toList
+    println(s"collectionsList: $collectionsList")
 
     collectionsList
   }
 
+  def getApplicationCollectionsList: List[String] = {
+    val orgInfoGet = client
+      .prepareGet(s"${Settings.baseUrl}/management/organizations/${Settings.org}/applications")
+      .setHeader("Cache-Control", "no-cache")
+      .setHeader("Accept", "application/json; charset=UTF-8")
+      .setHeader("Authorization", s"Bearer $getManagementToken")
+      .build()
+
+    val getResponse = client.executeRequest(orgInfoGet).get()
+    val topLevel: Map[String,Any] = JSON.parseFull(getResponse.getResponseBody).get.asInstanceOf[Map[String,Any]]
+    val data: Map[String,Any] = topLevel("data").asInstanceOf[Map[String,Any]]
+    val applicationsList: List[String] = (data map { case (key,value) => key }).toList
+    //println(applicationsList)
+
+    val collectionApplicationsListBuffer: scala.collection.mutable.ListBuffer[String] = scala.collection.mutable.ListBuffer[String]()
+    // for each app, get the list of collections
+    for (orgPlusApp <- applicationsList) {
+      println(s"getting $orgPlusApp")
+      val orgAppArray = orgPlusApp.split("/")
+      val org = orgAppArray(0)
+      val app = orgAppArray(1)
+      collectionApplicationsListBuffer.appendAll(getCollectionsList(org,app))
+    }
+
+    println(s"appCollections: ${collectionApplicationsListBuffer.toList}")
+    collectionApplicationsListBuffer.toList
+  }
+
   def sandboxCollection(): Integer = {
 
     val sandboxCollectionPost = client

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Utils.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Utils.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Utils.scala
index 91c8081..e289780 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Utils.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Utils.scala
@@ -18,6 +18,7 @@ package org.apache.usergrid.helpers
 
 import scala.util.Random
 import scala.util.parsing.json.JSONObject
+import org.apache.usergrid.settings.Settings
 
  /**
  *
@@ -87,7 +88,7 @@ object Utils {
    def randomEntityNameUrl(prefix: String, numEntities: Int, seed: Int, baseUrl: String): String = {
      val randomVal = generateRandomInt(seed, seed+numEntities-1)
 
-     s"$baseUrl/$prefix$randomVal"
+     if (Settings.getViaQuery) s"$baseUrl?ql=name='$prefix$randomVal'" else s"$baseUrl/$prefix$randomVal"
    }
 
   def createRandomPushNotifierName:String = {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/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 b3d19b4..3860c7c 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
@@ -60,9 +60,9 @@ object AuditScenarios {
       .foreach("${" + SessionVarCollectionEntities + "}", "singleResult") {
         exec(session => {
           val resultObj = session("singleResult").as[Map[String,Any]]
-          val uuid = resultObj("uuid").asInstanceOf[String]
-          val entityName = resultObj("name").asInstanceOf[String]
-          val modified = resultObj("modified").asInstanceOf[Long]
+          val uuid = resultObj.getOrElse("uuid", "").asInstanceOf[String]
+          val entityName = resultObj.getOrElse("name", "").asInstanceOf[String]
+          val modified = resultObj.getOrElse("modified", "-1").asInstanceOf[Long]
           val collectionName = session(SessionVarCollectionName).as[String]
           Settings.addAuditUuid(uuid, collectionName, entityName, modified)
           session
@@ -77,9 +77,9 @@ object AuditScenarios {
       .foreach("${" + SessionVarCollectionEntities + "}", "singleResult") {
         exec(session => {
           val resultObj = session("singleResult").as[Map[String,Any]]
-          val uuid = resultObj("uuid").asInstanceOf[String]
-          val entityName = resultObj("name").asInstanceOf[String]
-          val modified = resultObj("modified").asInstanceOf[Long]
+          val uuid = resultObj.getOrElse("uuid","").asInstanceOf[String]
+          val entityName = resultObj.getOrElse("name","").asInstanceOf[String]
+          val modified = resultObj.getOrElse("modified","-1").asInstanceOf[Long]
           val collectionName = session(SessionVarCollectionName).as[String]
           Settings.addAuditUuid(uuid, collectionName, entityName, modified)
           session
@@ -104,8 +104,15 @@ object AuditScenarios {
             }
           }
         }
+    }.exec { session =>
+      // displays the content of the session in the console (debugging only)
+      println(session)
+
+      // return the original session
+      session
     }
 
+
   val getCollectionEntity = exec(
     http("GET collection entity")
       .get("/${collectionName}?ql=uuid=${uuid}")

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/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 6c226d5..7ce8d0a 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
@@ -21,11 +21,11 @@ import java.util.concurrent.TimeUnit
 import java.util.concurrent.atomic.AtomicInteger
 import javax.xml.bind.DatatypeConverter
 import io.gatling.http.Predef._
+import io.gatling.core.Predef._
 import io.gatling.http.config.HttpProtocolBuilder
 import org.apache.usergrid.datagenerators.FeederGenerator
 import org.apache.usergrid.enums._
 import org.apache.usergrid.helpers.Utils
-
 import scala.collection.mutable
 
 object Settings {
@@ -71,14 +71,44 @@ object Settings {
   // load configuration settings via property or default
   val org = initStrSetting(ConfigProperties.Org)
   val app = initStrSetting(ConfigProperties.App)
+  val allApps: Boolean = app == "*"
   val adminUser = initStrSetting(ConfigProperties.AdminUser)
   val adminPassword = initStrSetting(ConfigProperties.AdminPassword)
 
   private val cfgBaseUrl = initStrSetting(ConfigProperties.BaseUrl)
   val baseUrl = if (cfgBaseUrl.takeRight(1) == "/") cfgBaseUrl.dropRight(1) else cfgBaseUrl
-  val baseAppUrl:String = baseUrl + "/" + org + "/" + app
-
-  val httpConf: HttpProtocolBuilder = http.baseURL(baseAppUrl)
+  def orgUrl(org: String): String = {
+    baseUrl + "/" + org
+  }
+  def appUrl(app: String): String = {
+    orgUrl(org) + "/" + app
+  }
+  val managementUrl = baseUrl + "/management/organizations" + org
+  val baseOrgUrl = orgUrl(org)
+  val baseAppUrl = appUrl(app)
+
+  private def httpConf(baseUrl: String): HttpProtocolBuilder = {
+    http
+      .baseURL(baseUrl)
+      .connection("keep-alive")
+      .extraInfoExtractor {
+        i =>
+          if (Settings.printFailedRequests && i.status == io.gatling.core.result.message.KO) {
+            println(s"==============")
+            println(s"Request: ${i.request.getMethod} ${i.request.getUrl}")
+            println(s"body:")
+            println(s"  ${i.request.getStringData}")
+            println(s"==============")
+            println(s"Response: ${i.response.statusCode.getOrElse(-1)}")
+            println(s"body:")
+            println(s"  ${i.response.body.string}")
+            println(s"==============")
+          }
+          Nil
+      }
+  }
+  val httpOrgConf: HttpProtocolBuilder = httpConf(baseOrgUrl)
+  val httpAppConf: HttpProtocolBuilder = httpConf(baseAppUrl)
   val authType = initStrSetting(ConfigProperties.AuthType)
   val tokenType = initStrSetting(ConfigProperties.TokenType)
 
@@ -146,6 +176,12 @@ object Settings {
   val entityProgressCount:Long = initLongSetting(ConfigProperties.EntityProgressCount)
   private val logEntityProgress: Boolean = entityProgressCount > 0L
   val injectionList = initStrSetting(ConfigProperties.InjectionList)
+  val printFailedRequests:Boolean = initBoolSetting(ConfigProperties.PrintFailedRequests)
+  val getViaQuery:Boolean = initBoolSetting(ConfigProperties.GetViaQuery)
+  val multiPropertyPrefix = initStrSetting(ConfigProperties.MultiPropertyPrefix)
+  val multiPropertyCount:Int = initIntSetting(ConfigProperties.MultiPropertyCount)
+  val multiPropertySizeInK:Int = initIntSetting(ConfigProperties.MultiPropertySizeInK)
+  val entityNumberProperty = initStrSetting(ConfigProperties.EntityNumberProperty)
 
   // Entity update
   val updateProperty = initStrSetting(ConfigProperties.UpdateProperty)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AuditSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AuditSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AuditSimulation.scala
index caeb9ec..47323ea 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AuditSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/AuditSimulation.scala
@@ -18,6 +18,7 @@ package org.apache.usergrid.simulations
 
 import io.gatling.core.Predef._
 import io.gatling.core.structure.ScenarioBuilder
+import io.gatling.http.config.HttpProtocolBuilder
 import org.apache.usergrid.enums.ScenarioType
 import org.apache.usergrid.helpers.Setup
 import org.apache.usergrid.scenarios.{AuditScenarios, EntityCollectionScenarios}
@@ -42,11 +43,14 @@ class AuditSimulation extends Simulation {
 
   if (ScenarioType.isValid(Settings.scenarioType)) {
     val scenario: ScenarioBuilder = getScenario(Settings.scenarioType)
+    val httpConf: HttpProtocolBuilder = Settings.httpOrgConf
+      .acceptHeader("application/json")
+
     setUp(
       scenario
         .inject(
           rampUsers(Settings.rampUsers) over Settings.rampTime
-        ).protocols(Settings.httpConf.acceptHeader("application/json"))
+        ).protocols(httpConf)
     )
   } else {
     println(s"Audit scenario type ${Settings.scenarioType} not found.")

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/ConfigurableSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/ConfigurableSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/ConfigurableSimulation.scala
index 66aaac0..96b87e5 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/ConfigurableSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/ConfigurableSimulation.scala
@@ -82,7 +82,7 @@ class ConfigurableSimulation extends Simulation {
     setUp(
       scenario
         .inject(injectStepList)
-          .protocols(Settings.httpConf.acceptHeader("application/json"))
+          .protocols(Settings.httpAppConf.connection("keep-alive").acceptHeader("application/json"))
     )
   } else {
     println(s"scenarioType ${Settings.scenarioType} not found.")

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/CustomInjectionSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/CustomInjectionSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/CustomInjectionSimulation.scala
index 9d27173..fe0fc43 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/CustomInjectionSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/CustomInjectionSimulation.scala
@@ -85,7 +85,7 @@ class CustomInjectionSimulation extends Simulation {
     setUp(
       scenario
         .inject(injectStepList)
-          .protocols(Settings.httpConf.acceptHeader("application/json"))
+          .protocols(Settings.httpAppConf.connection("keep-alive").acceptHeader("application/json"))
     )
   } else {
     println(s"scenarioType ${Settings.scenarioType} not found.")

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/AppSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/AppSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/AppSimulation.scala
index a66f6b7..d113c87 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/AppSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/AppSimulation.scala
@@ -36,6 +36,6 @@ class AppSimulation extends Simulation {
   setUp(
     NotificationScenarios.createScenario
       .inject(constantUsersPerSec(Settings.constantUsersPerSec) during (Settings.constantUsersDuration))
-      .protocols(Settings.httpConf.acceptHeader("application/json"))
+      .protocols(Settings.httpAppConf.acceptHeader("application/json"))
   ).throttle(reachRps(Settings.throttle) in (Settings.rampTime seconds), holdFor(Settings.holdDuration))
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/ConnectionsSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/ConnectionsSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/ConnectionsSimulation.scala
index 69ff0b1..86a5c11 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/ConnectionsSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/ConnectionsSimulation.scala
@@ -45,7 +45,7 @@ class ConnectionsSimulation extends Simulation{
     ConnectionScenarios.createScenario
       .inject(constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration) // 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"))
+      .protocols( Settings.httpAppConf.acceptHeader("application/json"))
   )
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/DeleteUsersSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/DeleteUsersSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/DeleteUsersSimulation.scala
index 444f67a..cc89dcc 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/DeleteUsersSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/DeleteUsersSimulation.scala
@@ -51,6 +51,6 @@ class DeleteUsersSimulation extends Simulation {
         rampUsers(Settings.rampUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration
 
-      )).protocols(Settings.httpConf.acceptHeader("application/json"))
+      )).protocols(Settings.httpAppConf.acceptHeader("application/json"))
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetEntitySimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetEntitySimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetEntitySimulation.scala
index 4f160c9..7b896e9 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetEntitySimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetEntitySimulation.scala
@@ -26,7 +26,7 @@ import scala.concurrent.duration._
 class GetEntitySimulation extends Simulation {
 
   // Target settings
-  val httpConf = Settings.httpConf
+  val httpConf = Settings.httpAppConf
 
   // Simulation settings
   val numUsers:Int = Settings.rampUsers

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUserPagesSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUserPagesSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUserPagesSimulation.scala
index c4fadc0..353c5db 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUserPagesSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUserPagesSimulation.scala
@@ -46,6 +46,6 @@ class GetUserPagesSimulation extends Simulation {
         rampUsers(Settings.rampUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration
 
-      )).protocols(Settings.httpConf.acceptHeader("application/json"))
+      )).protocols(Settings.httpAppConf.acceptHeader("application/json"))
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUsersSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUsersSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUsersSimulation.scala
index 5077fe9..bc3e899 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUsersSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/GetUsersSimulation.scala
@@ -46,6 +46,6 @@ class GetUsersSimulation extends Simulation {
         rampUsers(Settings.rampUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration
 
-      )).protocols(Settings.httpConf.acceptHeader("application/json"))
+      )).protocols(Settings.httpAppConf.acceptHeader("application/json"))
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostCustomEntitySimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostCustomEntitySimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostCustomEntitySimulation.scala
index 2db4160..d05a49c 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostCustomEntitySimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostCustomEntitySimulation.scala
@@ -51,7 +51,7 @@ class PostCustomEntitySimulation extends Simulation {
   val rampTime:Int = Settings.rampTime
   val throttle:Int = Settings.throttle
   val feeder = FeederGenerator.generateCustomEntityInfinite(0)
-  val httpConf = Settings.httpConf
+  val httpConf = Settings.httpAppConf
 
   val scnToRun = scenario("POST custom entities")
     .feed(feeder)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostUsersSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostUsersSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostUsersSimulation.scala
index c46a92b..04a7a3e 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostUsersSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PostUsersSimulation.scala
@@ -46,6 +46,6 @@ class PostUsersSimulation extends Simulation {
         rampUsers(Settings.rampUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration
 
-      )).protocols(Settings.httpConf.acceptHeader("application/json"))
+      )).protocols(Settings.httpAppConf.acceptHeader("application/json"))
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PushNotificationTargetUserSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PushNotificationTargetUserSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PushNotificationTargetUserSimulation.scala
index cc39a6f..3e11845 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PushNotificationTargetUserSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PushNotificationTargetUserSimulation.scala
@@ -39,7 +39,7 @@ class PushNotificationTargetUserSimulation extends Simulation {
       .inject(
         rampUsers(Settings.rampUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration)
-      .protocols( Settings.httpConf.acceptHeader("application/json"))
+      .protocols( Settings.httpAppConf.acceptHeader("application/json"))
   )
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutCustomEntitySimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutCustomEntitySimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutCustomEntitySimulation.scala
index 57e4faf..549f1f3 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutCustomEntitySimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutCustomEntitySimulation.scala
@@ -50,7 +50,7 @@ class PutCustomEntitySimulation extends Simulation {
   val rampTime:Int = Settings.rampTime
   val throttle:Int = Settings.throttle
   val feeder = FeederGenerator.generateCustomEntityPutInfinite(0)
-  val httpConf = Settings.httpConf
+  val httpConf = Settings.httpAppConf
 
   val scnToRun = scenario("PUT custom entities")
     .feed(feeder)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutUsersSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutUsersSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutUsersSimulation.scala
index ca65ab9..2b91785 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutUsersSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutUsersSimulation.scala
@@ -51,6 +51,6 @@ class PutUsersSimulation extends Simulation {
         rampUsers(Settings.rampUsers) over Settings.rampTime,
         constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration
 
-      )).protocols(Settings.httpConf.acceptHeader("application/json"))
+      )).protocols(Settings.httpAppConf.acceptHeader("application/json"))
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/SetupSimulation.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/SetupSimulation.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/SetupSimulation.scala
index 8032228..0e40004 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/SetupSimulation.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/SetupSimulation.scala
@@ -38,6 +38,6 @@ class SetupSimulation extends Simulation{
   setUp(
     UserScenarios.createUsersWithDevicesScenario
       .inject(splitUsers(Settings.rampUsers) into( rampUsers(10) over (10 seconds)) separatedBy (10 seconds))
-      .protocols(Settings.httpConf.acceptHeader("application/json"))
+      .protocols(Settings.httpAppConf.acceptHeader("application/json"))
   )
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/test/resources/gatling.conf
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/test/resources/gatling.conf b/stack/loadtests/src/test/resources/gatling.conf
index 1455242..ad07de5 100644
--- a/stack/loadtests/src/test/resources/gatling.conf
+++ b/stack/loadtests/src/test/resources/gatling.conf
@@ -10,7 +10,6 @@ gatling {
     #runDescription = ""          # The description for this simulation run, displayed in each report
     #encoding = "utf-8"           # Encoding to use throughout Gatling for file and string manipulation
     #simulationClass = ""         # The FQCN of the simulation to run (when used in conjunction with noReports, the simulation for which assertions will be validated)
-    #disableCompiler = false      # When set to true, skip compiling and load an already compiled simulation (used in conjunction with simulationClass)
     #mute = false                 # When set to true, don't ask for simulation name nor run description (currently only used by Gatling SBT plugin)
 
     extract {
@@ -47,9 +46,6 @@ gatling {
       #binaries = ""                             # If set, name of the folder where compiles classes are located
       #results = results                         # Name of the folder where all reports folder are located
     }
-    zinc {
-      #jvmArgs = "-Xss10M" # JVM args passed to Zinc (in charge of compiling Gatling Simulations)
-    }
   }
   charting {
     #noReports = false       # When set to true, don't generate HTML reports
@@ -114,7 +110,7 @@ gatling {
     #writers = "console, file" # The lists of DataWriters to which Gatling write simulation data (currently supported : "console", "file", "graphite", "jdbc")
     #reader = file             # The DataReader used by the charting engine for reading simulation results
     console {
-      #light = false           # When set to true, displays a light version without detailed request stats
+      light = true           # When set to true, displays a light version without detailed request stats
     }
     file {
       #bufferSize = 8192       # FileDataWriter's internal data buffer size, in bytes

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/test/resources/logback-test.xml
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/test/resources/logback-test.xml b/stack/loadtests/src/test/resources/logback-test.xml
index 35a4688..c0b7024 100644
--- a/stack/loadtests/src/test/resources/logback-test.xml
+++ b/stack/loadtests/src/test/resources/logback-test.xml
@@ -28,7 +28,7 @@
 	<!-- Uncomment for logging ALL HTTP request and responses -->
 	 	<!-- <logger name="io.gatling.http.ahc.AsyncHandlerActor" level="TRACE" /> -->
 	<!-- Uncomment for logging ONLY FAILED HTTP request and responses -->
-        <logger name="io.gatling.http.ahc.AsyncHandlerActor" level="DEBUG" />
+        <!-- <logger name="io.gatling.http.ahc.AsyncHandlerActor" level="DEBUG" /> -->
 
     <!-- <logger name="io.gatling.http" level="TRACE" /> -->
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/test/resources/logback.xml b/stack/loadtests/src/test/resources/logback.xml
index 232d333..3299ee6 100644
--- a/stack/loadtests/src/test/resources/logback.xml
+++ b/stack/loadtests/src/test/resources/logback.xml
@@ -29,7 +29,7 @@
 	<!-- Uncomment for logging ALL HTTP request and responses -->
 	 	<!-- <logger name="io.gatling.http.ahc.AsyncHandlerActor" level="TRACE" /> -->
 	<!-- Uncomment for logging ONLY FAILED HTTP request and responses -->
-	 	<logger name="io.gatling.http.ahc.AsyncHandlerActor" level="DEBUG" />
+	 	<!-- <logger name="io.gatling.http.ahc.AsyncHandlerActor" level="DEBUG" /> -->
 
 	<root level="WARN">
 		<appender-ref ref="CONSOLE" />

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/test/scala/Engine.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/test/scala/Engine.scala b/stack/loadtests/src/test/scala/Engine.scala
index 353b80c..3044095 100644
--- a/stack/loadtests/src/test/scala/Engine.scala
+++ b/stack/loadtests/src/test/scala/Engine.scala
@@ -20,13 +20,10 @@ import io.gatling.core.config.GatlingPropertiesBuilder
 object Engine extends App {
 
 	val props = new GatlingPropertiesBuilder
-	props.disableCompiler
 	props.dataDirectory(IDEPathHelper.dataDirectory.toString)
 	props.resultsDirectory(IDEPathHelper.resultsDirectory.toString)
-	props.requestBodiesDirectory(IDEPathHelper.requestBodiesDirectory.toString)
+	props.bodiesDirectory(IDEPathHelper.bodiesDirectory.toString)
 	props.binariesDirectory(IDEPathHelper.mavenBinariesDirectory.toString)
-  val simName = if(System.getProperty("gatling.simulationClass")!=null) System.getProperty("gatling.simulationClass") else "org.apache.usergrid.simulations.deprecated.AppSimulation";
-  props.simulationClass(simName)
 
 	Gatling.fromMap(props.build)
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/test/scala/IDEPathHelper.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/test/scala/IDEPathHelper.scala b/stack/loadtests/src/test/scala/IDEPathHelper.scala
index d68ee4d..8b29d41 100644
--- a/stack/loadtests/src/test/scala/IDEPathHelper.scala
+++ b/stack/loadtests/src/test/scala/IDEPathHelper.scala
@@ -14,13 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import scala.tools.nsc.io.File
-import scala.tools.nsc.io.Path.string2path
+import java.nio.file.Path
+
+import io.gatling.core.util.PathHelper._
 
 object IDEPathHelper {
 
-	val gatlingConfUrl = getClass.getClassLoader.getResource("gatling.conf").getPath
-	val projectRootDir = File(gatlingConfUrl).parents(2)
+	val gatlingConfUrl: Path = getClass.getClassLoader.getResource("gatling.conf").toURI
+	val projectRootDir = gatlingConfUrl.ancestor(3)
 
 	val mavenSourcesDirectory = projectRootDir / "src" / "test" / "scala"
 	val mavenResourcesDirectory = projectRootDir / "src" / "test" / "resources"
@@ -28,10 +29,10 @@ object IDEPathHelper {
 	val mavenBinariesDirectory = mavenTargetDirectory / "test-classes"
 
 	val dataDirectory = mavenResourcesDirectory / "data"
-	val requestBodiesDirectory = mavenResourcesDirectory / "request-bodies"
+	val bodiesDirectory = mavenResourcesDirectory / "bodies"
 
 	val recorderOutputDirectory = mavenSourcesDirectory
 	val resultsDirectory = mavenTargetDirectory / "results"
 
-	val recorderConfigFile = (mavenResourcesDirectory / "recorder.conf").toFile
+	val recorderConfigFile = mavenResourcesDirectory / "recorder.conf"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/src/test/scala/Recorder.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/test/scala/Recorder.scala b/stack/loadtests/src/test/scala/Recorder.scala
index 266480c..8467603 100644
--- a/stack/loadtests/src/test/scala/Recorder.scala
+++ b/stack/loadtests/src/test/scala/Recorder.scala
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+import io.gatling.recorder.GatlingRecorder
 import io.gatling.recorder.config.RecorderPropertiesBuilder
-import io.gatling.recorder.controller.RecorderController
 
 object Recorder extends App {
 
 	val props = new RecorderPropertiesBuilder
 	props.simulationOutputFolder(IDEPathHelper.recorderOutputDirectory.toString)
-	props.simulationPackage("org.apache.usergrid")
-	props.requestBodiesFolder(IDEPathHelper.requestBodiesDirectory.toString)
+	props.simulationPackage("${package}")
+	props.bodiesFolder(IDEPathHelper.bodiesDirectory.toString)
 
-	RecorderController(props.build, Some(IDEPathHelper.recorderConfigFile))
+	GatlingRecorder.fromMap(props.build, Some(IDEPathHelper.recorderConfigFile))
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/usergrid/blob/a3e7b7ee/stack/loadtests/testConfig.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/testConfig.sh b/stack/loadtests/testConfig.sh
index 0901e99..792df27 100755
--- a/stack/loadtests/testConfig.sh
+++ b/stack/loadtests/testConfig.sh
@@ -57,3 +57,7 @@ CONSTANT_USERS_PER_SEC=0
 CONSTANT_USERS_DURATION=10
 
 INJECTION_LIST="rampUsers(100,300);nothingFor(300)"
+
+PRINT_FAILED_REQUESTS=true
+
+GET_VIA_QUERY=false


[3/5] usergrid git commit: Add mockito test dependency to query index.

Posted by sn...@apache.org.
Add mockito test dependency to query index.


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

Branch: refs/heads/two-dot-o-dev
Commit: 1cc7a6ad59110a66da67f31c0041a1b4b4cc1d22
Parents: 230abf3
Author: Michael Russo <mi...@gmail.com>
Authored: Fri Aug 28 08:56:16 2015 -0700
Committer: Michael Russo <mi...@gmail.com>
Committed: Fri Aug 28 08:56:16 2015 -0700

----------------------------------------------------------------------
 stack/corepersistence/queryindex/pom.xml | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/1cc7a6ad/stack/corepersistence/queryindex/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/pom.xml b/stack/corepersistence/queryindex/pom.xml
index d0c6c79..2484cfd 100644
--- a/stack/corepersistence/queryindex/pom.xml
+++ b/stack/corepersistence/queryindex/pom.xml
@@ -121,6 +121,13 @@
         </dependency>
 
         <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>${mockito.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
             <version>${slf4j.version}</version>


[4/5] usergrid git commit: this closes #361

Posted by sn...@apache.org.
this closes #361


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

Branch: refs/heads/two-dot-o-dev
Commit: 75f8da7669479314964c1a9d73e7e8df9befc104
Parents: fd18f1f 1cc7a6a
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Aug 28 12:00:23 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Aug 28 12:00:23 2015 -0400

----------------------------------------------------------------------
 stack/corepersistence/queryindex/pom.xml | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------



[2/5] usergrid git commit: USERGRID-871: Replace loadtests README

Posted by sn...@apache.org.
USERGRID-871: Replace loadtests README

Also move Headers.scala to helpers directory and remove unused rpsTarget and rpsRampTime configuration parameters


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

Branch: refs/heads/two-dot-o-dev
Commit: 14e088d58ecefbbd74a495f04a17555367ff2daa
Parents: a3e7b7e
Author: Mike Dunker <mi...@calbears.net>
Authored: Wed Aug 26 07:57:37 2015 -0700
Committer: Mike Dunker <mi...@calbears.net>
Committed: Wed Aug 26 07:57:37 2015 -0700

----------------------------------------------------------------------
 stack/loadtests/.gitignore                      |   1 +
 stack/loadtests/README.md                       | 229 +++++++++++++++----
 stack/loadtests/runCollectionQueryTest.sh       |   2 +-
 stack/loadtests/runtests.sh                     | 120 ----------
 stack/loadtests/runtests_deprecated.sh          | 120 ++++++++++
 .../usergrid/enums/ConfigProperties.scala       |  12 +-
 .../org/apache/usergrid/helpers/Headers.scala   |  63 +++++
 .../scenarios/ApplicationScenarios.scala        |   3 +-
 .../usergrid/scenarios/AuditScenarios.scala     |   4 +-
 .../scenarios/ConnectionScenarios.scala         |   3 +-
 .../usergrid/scenarios/DeviceScenarios.scala    |   3 +-
 .../scenarios/EntityCollectionScenarios.scala   |   4 +-
 .../usergrid/scenarios/EntityScenarios.scala    |   2 +-
 .../usergrid/scenarios/GeoScenarios.scala       |   4 +-
 .../scenarios/NotificationScenarios.scala       |   3 +-
 .../usergrid/scenarios/NotifierScenarios.scala  |   3 +-
 .../scenarios/OrganizationScenarios.scala       |   3 +-
 .../usergrid/scenarios/TokenScenarios.scala     |   2 +-
 .../usergrid/scenarios/UserScenarios.scala      |   4 +-
 .../org/apache/usergrid/settings/Headers.scala  |  62 -----
 .../org/apache/usergrid/settings/Settings.scala |   2 -
 21 files changed, 398 insertions(+), 251 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/.gitignore
----------------------------------------------------------------------
diff --git a/stack/loadtests/.gitignore b/stack/loadtests/.gitignore
new file mode 100644
index 0000000..b012b3e
--- /dev/null
+++ b/stack/loadtests/.gitignore
@@ -0,0 +1 @@
+.java-version

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/README.md
----------------------------------------------------------------------
diff --git a/stack/loadtests/README.md b/stack/loadtests/README.md
index d497a10..0e70702 100644
--- a/stack/loadtests/README.md
+++ b/stack/loadtests/README.md
@@ -1,47 +1,192 @@
-#Running
-Gatling will run through mvn
+#Gatling Load Tests
+The Usergrid loadtests directory (/stack/loadtests) contains a framework for performance testing [Apache Usergrid](http://usergrid.apache.org/). These tests currently use version 2.1.7 of [Gatling](http://gatling.io), an open-source load-testing tool.
+
+The test code is written in [Scala](http://www.scala-lang.org/), which is Gatling's test language.
+
+##Usergrid Gatling test scripts
+The test scripts are found in the top level loadtests directory. Look inside the scripts to see the details for running the tests.
+
+###testConfig.sh
+Contains defaults that are used for all the other test scripts.
+
+###runAuditGetAllAppCollectionEntities.sh
+For a specified organization, finds all apps, and for each app, finds all collections and writes a CSV file line containing collection name, UUID, entity name, and modified timestamp for each entity in each collection.
+
+###runAuditGetCollectionEntities.sh
+For a specified organization and application, finds all collections and writes a CSV file line containing collection name, UUID, entity name, and modified timestamp for each entity in each collection.
+
+###runAuditVerifyCollectionEntities.sh
+For a specified organization and given CSV file, verify that all entities are retrievable, writing those that fail to another CSV file.
+
+###runCollectionQueryTest.sh
+For a given collection, retrieve all entities using a cursor and a query.
+
+###runCustomInjectRandomEntityByUuidTest.sh
+Gets random entity by UUIDs read from a CSV file. Includes custom injection steps.
+
+###runDeleteEntities.sh
+Deletes entities in order via name (prefix + entity number).
+
+###runGetEntitiesByNameSequential.sh
+Retrieves entities one by one via name (prefix + entity number).
+
+###runLoadEntities.sh
+Creates entities in order via name (prefix + entity number).
+
+###runLoadLargeMultiFieldEntities.sh
+Creates large multi-field entities in order via name (prefix + entity number).
+
+###runLoadNoNameEntities.sh
+Creates entities in order without names.
+
+###runLoadSortableEntities.sh
+Creates sortable entities in order via name (prefix + entity number).
+
+###runRandomEntityByNameQueryTest.sh
+Retrieves random entities via name (prefix + entity number) using queries.
+
+###runRandomEntityByNameTest.sh
+Retrieves random entities via name (prefix + entity number).
+
+###runRandomEntityByUuidTest.sh
+Retrieves random entities via UUID from a CSV file.
+
+###runUpdateEntities.sh
+Updates entities in order via name (prefix + entity number).
+
+##Gatling configuration items
+Understanding how configuration items work together can best be accomplished by reading the Usergrid Gatling test scripts. Some configuration items are dependent on others, and some are ignored by specific tests. Configuration items and their defaults can be found in the ConfigProperties.scala enumeration in the enums directory. The spelling of each item below is used in maven calls via -D{configName}={value} (for example, -Dorg=gatlingtest).
+
+Defaults listed are those that are specified by the Usergrid Gatling code, not necessarily defaults in the test scripts. Defaults are **bold**.
+
+* org (no default) - organization name
+* app (no default) - application name
+* collection (**"customentities"**) - collection name
+* sandboxCollection (**false**) - set permissions to allow all users read/write of collection (for anonymous access)
+* adminUser (no default) - username for administrative user (to get management tokens)
+* adminPassword (no default) - password for administrative user
+* appUser (no default) - username for application (non-management) user
+* appUserPassword (no default) - password for application user
+* baseUrl (no default) - base Usergrid URL (for example, https://api.usergrid.com); trailing slash is optional
+* authType (**"anonymous"**, "token", "basic") - type of authorization for test (does not affect setup operations)
+* tokenType ("none", **"user"**, "management") - type of token to use if authType = token
+* skipSetup (**false**) - skip entire setup section (can include creation of org and/or app, loading entities, and/or setting a collection to have world read-write permissions)
+* createOrg (**false**) - create the organization specified by the org configuration item (will continue if the org already exists)
+* createApp (**false**) - create the application specified by the app configuration item (will continue if the app already exists)
+* loadEntities (**false**) - load entities as part of setup, instead of as part of the test
+* scenarioType (**"nameRandomInfinite"**, "uuidRandomInfinite", "getByNameSequential", "getAllByCursor", "loadEntities", "updateEntities", "deleteEntities", "auditGetCollectionEntities", "auditVerifyCollectionEntities") - type of scenario to run, more details in test scripts section below
+* rampUsers (**0**) - number of users to inject during the ramp up time
+* rampTime (**0**) - duration in seconds of the ramp up time
+* constantUsersPerSec (**0**) - number of users per second to inject during the constant injection time (decimal ok)
+* constantUsersDuration (**10**) - duration in seconds of the constant injection time
+* numEntities (**5000**) - number of entities for the test
+* userSeed (**1**) - initial user seed; for example, if userSeed=5001 and numEntities=5000, entities 5001-10000 will be created
+* entityPrefix (**"entity"**) - prefix for entity name (example of entity name including prefix and entity number: "entity1")
+* entityType ("trivial", "trivialSortable", **"basic"**, "largeMultiField") - type of entity to create (trivial = 1 field, trivialSortable = trivial + sortableField containing random integer, basic = several fields with random values, largeMultiField = large entities with *multiPropertyCount* fields, each containing a string *multiPropertySizeInK* * 1000 characters long
+* multiPropertyPrefix (**"prop"**) - prefix for the largeMultiField entity's properties
+* multiPropertyCount (**1**) - number of properties for each entity
+* multiPropertySizeInK (**1**) - each property contains a string that is this number of kilobytes long
+* entityNumberProperty (no default) - property name that should contain the entity number (can be used for querying)
+* searchQuery (**""**) - query to be used for searching during test
+* searchLimit (**0**) - limit to be returned on searches
+* endConditionType (**"minutesElapsed"**, requestCount, unlimited) - end condition for the test (minutes elapsed, number of requests made, or never end)
+* endMinutes (**10**) - number of minutes to run test (if endConditionType = minutesElapsed)
+* endRequestCount (**1000**) - number of requests before test is ended (if conditionType = requestCount)
+* orgCreationUsername (no default) - username of admin account for org created during setup
+* orgCreationName (no default) - name of admin for org created during setup
+* orgCreationEmail (no default) - email address of admin for org created during setup
+* orgCreationPassword (**"test"**) - password for admin account for org created during setup
+* updateProperty (**"updateProp"**) - property name to be updated for update test
+* updateValue (**{current date}**) - value property should be given for update test
+* entityWorkerCount (**0**) - number of Gatling instances to be run at a time
+* entityWorkerNum (**0**) - worker number for this Gatling instance
+* uuidFilename (no default) - UUID filename for non-audit tests
+* auditUuidFilename (no default) - UUID filename for audit tests
+* failedUuidFilename (no default) - UUID filename for failed entries while auditing
+* retryCount (**5**) - number of retries of operation before giving up
+* purgeUsers (**100**) - number of entities to create at a time during loadEntities (send this many requests, then wait for the responses)
+* laterThanTimestamp (**0**) - if specified for an audit, will only match entities modified >= this timestamp; can be used for incremental audits
+* entityProgressCount (**10000**) - print to console every time this many requests has been sent (if entityProgressCount = 10000, will print on the 1000th, 2000th, 3000th... request)
+* injectionList (**"rampUsers(10,60)"**) - custom injection pattern for CustomInjectionSimulation (discussed below)
+* printFailedRequests (**true**) - prints the request and response on the console for failed requests (those that fail more than *retryCount* times)
+* getViaQuery (**false**) - retrieve entities via query instead of via name or uuid
+
+The following settings are currently not used (were used by deprecated tests, but may be valid in the future):
+
+* numDevices (**4000**) - number of devices for a push notification test
+* pushNotifier (**"loadNotifier"**) - push notifier
+* pushProvider (**"noop"**) - push provider
+* throttle (**50**) - maximum number of users at a time
+* holdDuration (**300**) - duration for test in seconds
+
+##User injection for tests
+The models for injection are based upon the simulation type chosen.
+
+###ConfigurableSimulation
+The configurable simulation currently has a single ramp up period (*rampUsers* are injected evenly over *rampTime* seconds) followed by a constant injection period (*constantUsersPerSec* are injected per second over *constantUsersDuration* number of seconds). This is a fairly simple injection pattern -- use CustomInjectionSimulation for more control.
+
+###CustomInjectionSimulation
+*injectionList* allows a custom injection pattern for user creation by passing in a single string containing [injection steps](http://gatling.io/docs/2.1.7/general/simulation_setup.html#injection) separated by semicolons.
+
+* atOnceUsers(nbUsers) - injects a given number of users at once (Gatling injection example: atOnceusers(10) )
+* constantUsersPerSec(rate,duration) - injects users at a constant rate, defined as users per second, during a given duration (Gatling injection example: constantUsersPerSec(20) during(15 seconds) )
+* constantUsersPerSecRandomized(rate,duration) - injects users at a constant rated, defined in users per second, during a given duration; users will be injected at randomized intervals (Gatling injection example: constantUsersPerSec(20) during(15 seconds) randomized)
+* heavisideUsers(nbUsers,duration) - injects a given number of users following a smooth approximation of the heaviside step function stretched to a given duration (Gatling injection example: heavisideUsers(1000) over(20 seconds) )
+* nothingFor(duration) - pause for a given duration (Gatling injection example: nothingFor(4 seconds) )
+* rampUsers(nbUsers,duration) - injects a given number of users with a linear ramp over a given duration in seconds (Gatling injection example: rampUsers(10) over 5 seconds)
+* rampUsersPerSec(rate1,rate2,duration) - injects users from starting rate to target rate, defined in users per second, during a given duration; users will be injected at regular intervals (Gatling injection example: rampUsersPerSec(rate1) to (rate2) during(duration) )
+* rampUsersPerSecRandomized(rate1,rate2,duration) - injects users from starting rate to target rate, defined in users per second, during a given duration; users will be injected at randomized intervals (Gatling injection example: rampUsersPerSec(rate1) to (rate2) during(duration) randomized)
+
+Example injectionList string: "rampUsers(100,300);nothingFor(60);constantUsersPerSecRandomized(10,120)"
+
+###AuditSimulation
+Audit simulation has only a single ramp up period (specified by *rampUsers* and *rampTime*).
+
+##loadtest structure
+Feel free to skip this section -- it contains information to help you understand the code
+
+* /stack/loadtests - Top level directory
+	* pom.xml - Gatling's Maven POM file
+	* testConfig.sh - contains defaults for configuration items (listed above)
+	* run*.sh - scripts that simplify running Usergrid Gatling test scripts (listed above)
+
+* /stack/loadtests/src - Code for Usergrid tests
+
+* /stack/loadtests/target - Contains code and resources when tests are compiled and run
+
+* /stack/loadtests/src/main/scala/org/apache/usergrid/datagenerators - Contains code to generate [Gatling feeders](http://gatling.io/docs/2.1.7/session/feeder.html) and build entities to be stored in Usergrid collections during tests
+
+* /stack/loadtests/src/main/scala/org/apache/usergrid/enums - Contains enumerations for test configuration items
+
+* /stack/loadtests/src/main/scala/org/apache/usergrid/helpers - Contains helper functionality
+	* Extractors.scala - extracts information from payloads and injects information into the [Gatling session](http://gatling.io/docs/2.1.7/session/session_api.html)
+	* Headers.scala - common headers to be added into generated requests
+	* Setup.scala - contains functions to set up a test (for example, creation of an organization or application) and get OAuth tokens
+	* Utils.scala - utilities to create random elements and URLs
+
+* /stack/loadtests/src/main/scala/org/apache/usergrid/scenarios - Contains [Gatling scenarios](http://gatling.io/docs/2.1.7/general/scenario.html) used in the Gatling simulations; most of the current tests use the scenarios in EntityCollectionScenarios.scala and AuditScenarios.scala
+
+* /stack/loadtests/src/main/scala/org/apache/usergrid/settings - Contains code to handle test settings and generate CSV files for use in testing
+
+* /stack/loadtests/src/main/scala/org/apache/usergrid/simulations - Contains [Gatling simulations](http://gatling.io/docs/2.1.7/general/simulation_structure.html) for running the tests
+	* AuditSimulation.scala - Tests for a) finding all entities in an organization and writing the names and UUIDs to a CSV file, and b) validating the existence of the entities in the CSV file; audit tests can be used to test that a copy/migration of an organization is complete
+	* ConfigurableSimulation.scala - contains many different types of tests that can be configured via Gatling test shell script or maven Gatling call
+	* CustomInjectionSimulation.scala - tests that allow full configuration of [Gatling user injection] via Gatling test shell script or maven Gatling call
+
+##Running tests using Maven
+Gatling uses [Apache Maven](https://maven.apache.org/) to handle dependencies and run the tests. The test scripts run gatling via maven, and have good examples of the maven calls.
+
+###Example Maven (run from loadtests directory)
+
+    > mvn gatling:execute \
+       -Dorg=myorg
+       -Dapp=myapp
+       -DbaseUrl=http://api.usergrid.com
+       ...
+       -DscenarioType=loadEntities
+       -Dgatling.simulationClass=org.apache.usergrid.simulations.ConfigurableSimulation
 
-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} -DmaxPossibleUsers={totalUsersInteger} -DrampTime={rampTimeIntegerSeconds} -DadminUser={username} -DadminPassword={pwd} -Dgatling.simulationClass={simulationFQDN}
-
-    *Addional optional settings 
-        
-    >-DpushNotifier={notifierName} -DpushProvider={noop_apns_or_gcm} -DskipSetup={boolean}
-
-    skipSetup will skip the setup steps
-
-    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 -DmaxPossibleUsers=600 -DrampTime=30 -DadminUser=usergrid -DadminPassword=test -Dgatling.simulationClass=org.apache.usergrid.simulations.deprecated.AppSimulation
-    
-    Setting the users and duration => Injects a given number of users with a linear ramp over a given duration. users must be greater than duration
-    
-    Setting the throttle and ramptime => will attempt to hit a set reqs/sec over a given time period.  If users and duration are not great enough then you will never hit your throttle
-    
-    Values for simulation are 'all','connections'
-    
-    Also see http://gatling.io/docs/2.0.2/general/simulation_setup.html
-    
-    Additional docs can be found here http://gatling.io/docs/2.0.2/
-
-##Running a Push Notification Simulation
-
-1. Set up all users in the system with 2 devices each.
-
-    >mvn compile gatling:execute -Dgatling.simulationClass=org.apache.usergrid.simulations.deprecated.SetupSimulation -DadminUser=usergrid -DadminPassword=test -Dorg=usergrid  -Dapp=load -Dthrottle=100 -Dbaseurl=http://loadtest.usergrid.com -DmaxPossibleUsers=1000
-
-
-    Note the following.
-
-
-    **throttle:**  The max number of users + devices per second to create
-
-    **maxPossibleUsers:**  The maximum number of users the simulation will create before exiting
-
-
-1. No
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/runCollectionQueryTest.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runCollectionQueryTest.sh b/stack/loadtests/runCollectionQueryTest.sh
index 7e5ad88..714b817 100755
--- a/stack/loadtests/runCollectionQueryTest.sh
+++ b/stack/loadtests/runCollectionQueryTest.sh
@@ -57,7 +57,7 @@ SCENARIO_TYPE=getAllByCursor
 mvn compile
 
 #Execute the test
-mvn gatling:execute -Dorg=usergrid \
+mvn gatling:execute \
 -DbaseUrl=${URL} \
 -DadminUser=${ADMIN_USER}  \
 -DadminPassword=${ADMIN_PASSWORD}  \

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/runtests.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runtests.sh b/stack/loadtests/runtests.sh
deleted file mode 100755
index ea9658c..0000000
--- a/stack/loadtests/runtests.sh
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/bash
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#               http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-die() { echo "$@" 1>&2 ; exit 1; }
-
-####
-#This is a script to simplify running gatling tests.  It will default several parameters, invoke the maven plugins
-#Then aggregate the results
-####
-[ "$#" -eq 4 ] || die "4 arguments required, $# provided.  Example is $0 URL MAX_CONCURRENT_USERS RAMP_TIME(seconds) DURATION_TIME(seconds)"
-
-URL="$1"
-MAX_CONCURRENT_USERS="$2"
-RAMP_TIME="$3"
-DURATION_TIME="$4"
-
-shift 4
-
-#Compile everything
-mvn compile
-
-#Set the app id to be a date epoch for uniqueness
-APP1=$(date +%s)
-
-
-
-#Execute the post step
-mvn gatling:execute -Dorg=usergrid \
--Dbaseurl=${URL} \
--DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
--DrampTime=${RAMP_TIME}  \
--DadminUser=usergrid  \
--DadminPassword=test  \
--Dduration=${DURATION_TIME}    \
--Dgatling.simulationClass=org.apache.usergrid.simulations.PostUsersSimulation \
--Dapp=${APP1}
-
-
-#Execute the get users by username
-mvn gatling:execute -Dorg=usergrid \
--Dbaseurl=${URL} \
--DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
--DrampTime=${RAMP_TIME}  \
--DadminUser=usergrid  \
--DadminPassword=test  \
--Dduration=${DURATION_TIME}    \
--Dgatling.simulationClass=org.apache.usergrid.simulations.GetUsersSimulation \
--Dapp=${APP1}
-
-
-#Execute the get users by page
-mvn gatling:execute -Dorg=usergrid \
--Dbaseurl=${URL} \
--DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
--DrampTime=${RAMP_TIME}  \
--DadminUser=usergrid  \
--DadminPassword=test  \
--Dduration=${DURATION_TIME}    \
--Dgatling.simulationClass=org.apache.usergrid.simulations.GetUserPagesSimulation \
--Dapp=${APP1}
-
-
-APP2=$(date +%s)
-
-#Execute put users to create them
-mvn gatling:execute -Dorg=usergrid \
--Dbaseurl=${URL} \
--DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
--DrampTime=${RAMP_TIME}  \
--DadminUser=usergrid  \
--DadminPassword=test  \
--Dduration=${DURATION_TIME}    \
--Dgatling.simulationClass=org.apache.usergrid.simulations.PutUsersSimulation \
--Dapp=${APP2}
-
-#Execute the put users to update them
-mvn gatling:execute -Dorg=usergrid \
--Dbaseurl=${URL} \
--DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
--rampTime=${RAMP_TIME}  \
--DadminUser=usergrid  \
--DadminPassword=test  \
--Dduration=${DURATION_TIME}    \
--Dgatling.simulationClass=org.apache.usergrid.simulations.PutUsersSimulation \
--Dapp=${APP2}
-
-
-#Execute the delete to remove them
-mvn gatling:execute -Dorg=usergrid \
--Dbaseurl=${URL} \
--DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
--DrampTime=${RAMP_TIME}  \
--DadminUser=usergrid  \
--DadminPassword=test  \
--Dduration=${DURATION_TIME}    \
--Dgatling.simulationClass=org.apache.usergrid.simulations.DeleteUsersSimulation \
--Dapp=${APP2}
-
-
-#Now move all the reports
-#AGGREGATE_DIR="target/aggregate-$(date +%s)"
-
-#mkdir -p ${AGGREGATE_DIR}
-
-
-#copy to the format of target/aggregate(date)/(simnulationame)-simulation.log
-#find target -name "simulation.log" -exec cp {} ${AGGREGATE_DIR}/$(basename $(dirname {} ))-simulation.log  \;
-

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/runtests_deprecated.sh
----------------------------------------------------------------------
diff --git a/stack/loadtests/runtests_deprecated.sh b/stack/loadtests/runtests_deprecated.sh
new file mode 100755
index 0000000..ea9658c
--- /dev/null
+++ b/stack/loadtests/runtests_deprecated.sh
@@ -0,0 +1,120 @@
+#!/bin/bash
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#               http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+die() { echo "$@" 1>&2 ; exit 1; }
+
+####
+#This is a script to simplify running gatling tests.  It will default several parameters, invoke the maven plugins
+#Then aggregate the results
+####
+[ "$#" -eq 4 ] || die "4 arguments required, $# provided.  Example is $0 URL MAX_CONCURRENT_USERS RAMP_TIME(seconds) DURATION_TIME(seconds)"
+
+URL="$1"
+MAX_CONCURRENT_USERS="$2"
+RAMP_TIME="$3"
+DURATION_TIME="$4"
+
+shift 4
+
+#Compile everything
+mvn compile
+
+#Set the app id to be a date epoch for uniqueness
+APP1=$(date +%s)
+
+
+
+#Execute the post step
+mvn gatling:execute -Dorg=usergrid \
+-Dbaseurl=${URL} \
+-DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DadminUser=usergrid  \
+-DadminPassword=test  \
+-Dduration=${DURATION_TIME}    \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.PostUsersSimulation \
+-Dapp=${APP1}
+
+
+#Execute the get users by username
+mvn gatling:execute -Dorg=usergrid \
+-Dbaseurl=${URL} \
+-DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DadminUser=usergrid  \
+-DadminPassword=test  \
+-Dduration=${DURATION_TIME}    \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.GetUsersSimulation \
+-Dapp=${APP1}
+
+
+#Execute the get users by page
+mvn gatling:execute -Dorg=usergrid \
+-Dbaseurl=${URL} \
+-DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DadminUser=usergrid  \
+-DadminPassword=test  \
+-Dduration=${DURATION_TIME}    \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.GetUserPagesSimulation \
+-Dapp=${APP1}
+
+
+APP2=$(date +%s)
+
+#Execute put users to create them
+mvn gatling:execute -Dorg=usergrid \
+-Dbaseurl=${URL} \
+-DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DadminUser=usergrid  \
+-DadminPassword=test  \
+-Dduration=${DURATION_TIME}    \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.PutUsersSimulation \
+-Dapp=${APP2}
+
+#Execute the put users to update them
+mvn gatling:execute -Dorg=usergrid \
+-Dbaseurl=${URL} \
+-DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
+-rampTime=${RAMP_TIME}  \
+-DadminUser=usergrid  \
+-DadminPassword=test  \
+-Dduration=${DURATION_TIME}    \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.PutUsersSimulation \
+-Dapp=${APP2}
+
+
+#Execute the delete to remove them
+mvn gatling:execute -Dorg=usergrid \
+-Dbaseurl=${URL} \
+-DmaxPossibleUsers=${MAX_CONCURRENT_USERS}  \
+-DrampTime=${RAMP_TIME}  \
+-DadminUser=usergrid  \
+-DadminPassword=test  \
+-Dduration=${DURATION_TIME}    \
+-Dgatling.simulationClass=org.apache.usergrid.simulations.DeleteUsersSimulation \
+-Dapp=${APP2}
+
+
+#Now move all the reports
+#AGGREGATE_DIR="target/aggregate-$(date +%s)"
+
+#mkdir -p ${AGGREGATE_DIR}
+
+
+#copy to the format of target/aggregate(date)/(simnulationame)-simulation.log
+#find target -name "simulation.log" -exec cp {} ${AGGREGATE_DIR}/$(basename $(dirname {} ))-simulation.log  \;
+

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/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 8a4fd53..0a5f5af 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
@@ -45,8 +45,6 @@ object ConfigProperties {
   val Collection = "collection"
   val RampTime = "rampTime"
   val Throttle = "throttle"
-  val RpsTarget = "rpsTarget"
-  val RpsRampTime = "rpsRampTime"
   val HoldDuration = "holdDuration"
   val PushNotifier = "pushNotifier"
   val PushProvider = "pushProvider"
@@ -84,7 +82,7 @@ object ConfigProperties {
 
   val Values = Seq(Org,App,AdminUser,AdminPassword,BaseUrl,AuthType,TokenType,SkipSetup,CreateOrg,CreateApp,LoadEntities,
     ScenarioType,RampUsers,ConstantUsersPerSec,ConstantUsersDuration,UserSeed,AppUser,AppUserPassword,NumEntities,
-    NumDevices,Collection,RampTime,Throttle,RpsTarget,RpsRampTime,HoldDuration,PushNotifier,PushProvider,EntityPrefix,
+    NumDevices,Collection,RampTime,Throttle,HoldDuration,PushNotifier,PushProvider,EntityPrefix,
     EntityType,EntitySeed,SearchLimit,SearchQuery,EndConditionType,EndMinutes,EndRequestCount,OrgCreationUsername,
     OrgCreationName,OrgCreationEmail,OrgCreationPassword,UpdateProperty,UpdateValue,EntityWorkerCount,EntityWorkerNum,
     UuidFilename,AuditUuidFilename,FailedUuidFilename,SandboxCollection,PurgeUsers,RetryCount,LaterThanTimestamp,
@@ -122,8 +120,6 @@ object ConfigProperties {
         case Collection => "customentities"
         case RampTime => 0
         case Throttle => 50
-        case RpsTarget => 50
-        case RpsRampTime => 10
         case HoldDuration => 300
         case PushNotifier => "loadNotifier"
         case PushProvider => "noop"
@@ -143,9 +139,9 @@ object ConfigProperties {
         case UpdateValue => new Date().toString
         case EntityWorkerCount => 0
         case EntityWorkerNum => 0
-        case UuidFilename => "dummyUuid.csv"
-        case AuditUuidFilename => "dummyAuditUuid.csv"
-        case FailedUuidFilename => "/tmp/dummy.csv"
+        case UuidFilename => "/tmp/dummyUuid.csv"
+        case AuditUuidFilename => "/tmp/dummyAuditUuid.csv"
+        case FailedUuidFilename => "/tmp/dummyFailedUuid.csv"
         case SandboxCollection => false
         case PurgeUsers => 100
         case RetryCount => 5

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/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
new file mode 100755
index 0000000..9feb197
--- /dev/null
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/helpers/Headers.scala
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.helpers
+
+import org.apache.usergrid.enums.AuthType
+import org.apache.usergrid.settings.Settings
+
+/**
+ *
+ */
+object Headers {
+
+  /**
+   * Headers for anonymous posts
+   */
+  val authAnonymous = Map(
+    "Cache-Control" -> """no-cache""",
+    "Content-Type" -> """application/json; charset=UTF-8"""
+  )
+
+  /**
+   * Headers for authorized users with token and json content type
+   */
+  val authToken = Map(
+    "Cache-Control" -> """no-cache""",
+    "Content-Type" -> """application/json; charset=UTF-8""",
+    "Authorization" -> "Bearer ${authToken}"
+  )
+
+  /**
+  * Headers for basic auth
+  */
+  val authBasic = Map(
+    "Cache-Control" -> """no-cache""",
+    "Content-Type" -> """application/json; charset=UTF-8""",
+    "Authorization" -> ("Basic " + Settings.appUserBase64)
+  )
+
+  /**
+  * Header selector
+  */
+  def auth(authType:String): Map[String, String] = {
+    if (authType == AuthType.Basic) authBasic
+    else if (authType == AuthType.Token) authToken
+    else authAnonymous
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ApplicationScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ApplicationScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ApplicationScenarios.scala
index 085af88..d47b7e8 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ApplicationScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ApplicationScenarios.scala
@@ -18,7 +18,8 @@
 
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
-import org.apache.usergrid.settings.{Settings, Headers}
+ import org.apache.usergrid.helpers.Headers
+ import org.apache.usergrid.settings.Settings
 
  /**
  * Performs organization registration

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/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 3860c7c..3a7121b 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
@@ -22,8 +22,8 @@ import io.gatling.http.Predef._
 import org.apache.usergrid.datagenerators.FeederGenerator
 import org.apache.usergrid.enums.{AuthType, EndConditionType}
 import org.apache.usergrid.helpers.Extractors._
-import org.apache.usergrid.helpers.Utils
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.helpers.{Headers, Utils}
+import org.apache.usergrid.settings.Settings
 
 /**
  * Provides CRUD methods for audits

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ConnectionScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ConnectionScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ConnectionScenarios.scala
index 56a40bb..9f613da 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ConnectionScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/ConnectionScenarios.scala
@@ -19,7 +19,8 @@ package org.apache.usergrid.scenarios
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
 import org.apache.usergrid.datagenerators.FeederGenerator
-import org.apache.usergrid.settings.{Settings, Headers}
+import org.apache.usergrid.helpers.Headers
+import org.apache.usergrid.settings.Settings
 
 object ConnectionScenarios {
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/DeviceScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/DeviceScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/DeviceScenarios.scala
index 57df0b9..28aa935 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/DeviceScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/DeviceScenarios.scala
@@ -19,7 +19,8 @@ package org.apache.usergrid.scenarios
 import io.gatling.core.Predef._
 import io.gatling.http.Predef.StringBody
 import io.gatling.http.Predef._
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.helpers.Headers
+import org.apache.usergrid.settings.Settings
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/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 eb7fce2..354420b 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
@@ -22,8 +22,8 @@ import io.gatling.http.Predef._
 import org.apache.usergrid.datagenerators.FeederGenerator
 import org.apache.usergrid.enums.{EndConditionType, AuthType}
 import org.apache.usergrid.helpers.Extractors._
-import org.apache.usergrid.helpers.Utils
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.helpers.{Headers, Utils}
+import org.apache.usergrid.settings.Settings
 
 /**
  * Provides CRUD methods for custom entities

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
index df1657b..1171296 100644
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/EntityScenarios.scala
@@ -18,7 +18,7 @@ package org.apache.usergrid.scenarios
 
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
-import org.apache.usergrid.settings.Headers
+import org.apache.usergrid.helpers.Headers
 
 
 /**

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/GeoScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/GeoScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/GeoScenarios.scala
index d7b108e..5487cd4 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/GeoScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/GeoScenarios.scala
@@ -18,8 +18,8 @@
 
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
-import org.apache.usergrid.helpers.Utils
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.helpers.{Headers, Utils}
+import org.apache.usergrid.settings.Settings
 
 object GeoScenarios {
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotificationScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotificationScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotificationScenarios.scala
index 738c43a..1bd2a27 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotificationScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotificationScenarios.scala
@@ -18,8 +18,9 @@ package org.apache.usergrid.scenarios
 
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
+import org.apache.usergrid.helpers.Headers
 
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.settings.Settings
 
 
 /**

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotifierScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotifierScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotifierScenarios.scala
index 11f57bd..a16b800 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotifierScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/NotifierScenarios.scala
@@ -18,7 +18,8 @@ package org.apache.usergrid.scenarios
 
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.helpers.Headers
+import org.apache.usergrid.settings.Settings
 
 /**
  *

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/OrganizationScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/OrganizationScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/OrganizationScenarios.scala
index 3e6593d..d835cf1 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/OrganizationScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/OrganizationScenarios.scala
@@ -19,7 +19,8 @@ package org.apache.usergrid.scenarios
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
 import org.apache.usergrid.datagenerators.FeederGenerator
-import org.apache.usergrid.settings.{Settings, Headers}
+import org.apache.usergrid.helpers.Headers
+import org.apache.usergrid.settings.Settings
 
 /**
  * Performs organization registration

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/TokenScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/TokenScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/TokenScenarios.scala
index c7ff4db..bfe3064 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/TokenScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/TokenScenarios.scala
@@ -19,7 +19,7 @@ package org.apache.usergrid.scenarios
 import io.gatling.core.Predef._
 import io.gatling.http.Predef._
 import io.gatling.http.request.StringBody
-import org.apache.usergrid.settings.Headers
+import org.apache.usergrid.helpers.Headers
 import org.apache.usergrid.settings.Settings
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/UserScenarios.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/UserScenarios.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/UserScenarios.scala
index 7269af7..39540c6 100755
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/UserScenarios.scala
+++ b/stack/loadtests/src/main/scala/org/apache/usergrid/scenarios/UserScenarios.scala
@@ -21,9 +21,9 @@ import io.gatling.core.Predef._
 import io.gatling.http.Predef._
 import io.gatling.http.request.StringBody
 import org.apache.usergrid.datagenerators.FeederGenerator
-import org.apache.usergrid.settings.{Headers, Settings}
+import org.apache.usergrid.settings.Settings
 import org.apache.usergrid.helpers.Extractors._
-import org.apache.usergrid.helpers.Utils
+import org.apache.usergrid.helpers.{Headers, Utils}
 
 
 object UserScenarios {

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Headers.scala
----------------------------------------------------------------------
diff --git a/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Headers.scala b/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Headers.scala
deleted file mode 100755
index d158f0c..0000000
--- a/stack/loadtests/src/main/scala/org/apache/usergrid/settings/Headers.scala
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.settings
-
-import org.apache.usergrid.enums.AuthType
-
- /**
- *
- */
-object Headers {
-
-  /**
-   * Headers for anonymous posts
-   */
-  val authAnonymous = Map(
-    "Cache-Control" -> """no-cache""",
-    "Content-Type" -> """application/json; charset=UTF-8"""
-  )
-
-  /**
-   * Headers for authorized users with token and json content type
-   */
-  val authToken = Map(
-    "Cache-Control" -> """no-cache""",
-    "Content-Type" -> """application/json; charset=UTF-8""",
-    "Authorization" -> "Bearer ${authToken}"
-  )
-
-  /**
-  * Headers for basic auth
-  */
-  val authBasic = Map(
-    "Cache-Control" -> """no-cache""",
-    "Content-Type" -> """application/json; charset=UTF-8""",
-    "Authorization" -> ("Basic " + Settings.appUserBase64)
-  )
-
-  /**
-  * Header selector
-  */
-  def auth(authType:String): Map[String, String] = {
-    if (authType == AuthType.Basic) authBasic
-    else if (authType == AuthType.Token) authToken
-    else authAnonymous
-  }
-
-
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/14e088d5/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 7ce8d0a..c78a347 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
@@ -138,8 +138,6 @@ object Settings {
 
   val rampTime:Int = initIntSetting(ConfigProperties.RampTime) // in seconds
   val throttle:Int = initIntSetting(ConfigProperties.Throttle) // in seconds
-  val rpsTarget:Int = initIntSetting(ConfigProperties.RpsTarget) // requests per second target
-  val rpsRampTime:Int = initIntSetting(ConfigProperties.RpsRampTime) // in seconds
   val holdDuration:Int = initIntSetting(ConfigProperties.HoldDuration) // in seconds
 
   // Geolocation settings


[5/5] usergrid git commit: This closes #353

Posted by sn...@apache.org.
This closes #353


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

Branch: refs/heads/two-dot-o-dev
Commit: 88b64e435fbdc1e6b7b689c26f26cee55cfe2c22
Parents: 75f8da7 14e088d
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Aug 28 12:03:59 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Aug 28 12:03:59 2015 -0400

----------------------------------------------------------------------
 stack/loadtests/.gitignore                      |   1 +
 stack/loadtests/README.md                       | 229 +++++++++++++++----
 stack/loadtests/pom.xml                         |  13 +-
 .../runAuditGetAllAppCollectionEntities.sh      |  68 ++++++
 .../loadtests/runAuditGetCollectionEntities.sh  |   1 +
 .../runAuditVerifyCollectionEntities.sh         |   1 +
 stack/loadtests/runCollectionQueryTest.sh       |   3 +-
 .../runCustomInjectRandomEntityByUuidTest.sh    |   1 +
 stack/loadtests/runDeleteEntities.sh            |   1 +
 .../loadtests/runGetEntitiesByNameSequential.sh |   1 +
 stack/loadtests/runLoadEntities.sh              |   1 +
 .../loadtests/runLoadLargeMultiFieldEntities.sh | 107 +++++++++
 stack/loadtests/runLoadNoNameEntities.sh        |   1 +
 stack/loadtests/runLoadSortableEntities.sh      |   3 +-
 .../loadtests/runRandomEntityByNameQueryTest.sh |  91 ++++++++
 stack/loadtests/runRandomEntityByNameTest.sh    |   1 +
 stack/loadtests/runRandomEntityByUuidTest.sh    |   1 +
 stack/loadtests/runUpdateEntities.sh            |   1 +
 stack/loadtests/runtests.sh                     | 120 ----------
 stack/loadtests/runtests_deprecated.sh          | 120 ++++++++++
 .../datagenerators/EntityDataGenerator.scala    |  19 +-
 .../datagenerators/FeederGenerator.scala        |   8 +-
 .../usergrid/enums/ConfigProperties.scala       |  27 ++-
 .../org/apache/usergrid/enums/EntityType.scala  |   3 +-
 .../org/apache/usergrid/helpers/Headers.scala   |  63 +++++
 .../org/apache/usergrid/helpers/Setup.scala     |  39 +++-
 .../org/apache/usergrid/helpers/Utils.scala     |   3 +-
 .../scenarios/ApplicationScenarios.scala        |   3 +-
 .../usergrid/scenarios/AuditScenarios.scala     |  23 +-
 .../scenarios/ConnectionScenarios.scala         |   3 +-
 .../usergrid/scenarios/DeviceScenarios.scala    |   3 +-
 .../scenarios/EntityCollectionScenarios.scala   |   4 +-
 .../usergrid/scenarios/EntityScenarios.scala    |   2 +-
 .../usergrid/scenarios/GeoScenarios.scala       |   4 +-
 .../scenarios/NotificationScenarios.scala       |   3 +-
 .../usergrid/scenarios/NotifierScenarios.scala  |   3 +-
 .../scenarios/OrganizationScenarios.scala       |   3 +-
 .../usergrid/scenarios/TokenScenarios.scala     |   2 +-
 .../usergrid/scenarios/UserScenarios.scala      |   4 +-
 .../org/apache/usergrid/settings/Headers.scala  |  62 -----
 .../org/apache/usergrid/settings/Settings.scala |  46 +++-
 .../usergrid/simulations/AuditSimulation.scala  |   6 +-
 .../simulations/ConfigurableSimulation.scala    |   2 +-
 .../simulations/CustomInjectionSimulation.scala |   2 +-
 .../simulations/deprecated/AppSimulation.scala  |   2 +-
 .../deprecated/ConnectionsSimulation.scala      |   2 +-
 .../deprecated/DeleteUsersSimulation.scala      |   2 +-
 .../deprecated/GetEntitySimulation.scala        |   2 +-
 .../deprecated/GetUserPagesSimulation.scala     |   2 +-
 .../deprecated/GetUsersSimulation.scala         |   2 +-
 .../deprecated/PostCustomEntitySimulation.scala |   2 +-
 .../deprecated/PostUsersSimulation.scala        |   2 +-
 .../PushNotificationTargetUserSimulation.scala  |   2 +-
 .../deprecated/PutCustomEntitySimulation.scala  |   2 +-
 .../deprecated/PutUsersSimulation.scala         |   2 +-
 .../deprecated/SetupSimulation.scala            |   2 +-
 stack/loadtests/src/test/resources/gatling.conf |   6 +-
 .../src/test/resources/logback-test.xml         |   2 +-
 stack/loadtests/src/test/resources/logback.xml  |   2 +-
 stack/loadtests/src/test/scala/Engine.scala     |   5 +-
 .../src/test/scala/IDEPathHelper.scala          |  13 +-
 stack/loadtests/src/test/scala/Recorder.scala   |   8 +-
 stack/loadtests/testConfig.sh                   |   4 +
 63 files changed, 850 insertions(+), 316 deletions(-)
----------------------------------------------------------------------