http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 549f1f3..0000000 --- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutCustomEntitySimulation.scala +++ /dev/null @@ -1,75 +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.simulations.deprecated - -import io.gatling.core.Predef._ -import io.gatling.core.scenario.Simulation -import org.apache.usergrid.datagenerators.FeederGenerator -import org.apache.usergrid.scenarios.EntityScenarios -import org.apache.usergrid.settings.Settings - -/** - * PostCustomEntitySimulation - creates lots of custom entities - * - * Run this way: - * mvn gatling:execute -DrampTime=10 -DmaxPossibleUsers=10 -Dduration=120 -Dorg=yourorgname -Dapp=sandbox -Dbaseurl=https://api.usergrid.com -DadminUser=yourusername -DadminPassword='yourpassword' -Dgatling.simulationClass=org.apache.usergrid.simulations.deprecated.PostCustomEntitySimulation -Dcollection=yourcollection - * - * - */ -class PutCustomEntitySimulation extends Simulation { - - if(!Settings.skipSetup) { - println("Begin setup") - println("These aren't the droids you are looking for...") - //exec(TokenScenarios.getManagementToken) - println("End Setup") - }else{ - println("Skipping Setup") - } - - val numEntities:Int = Settings.numEntities - val collection = Settings.collection - println("collection type = " + collection) - val rampTime:Int = Settings.rampTime - val throttle:Int = Settings.throttle - val feeder = FeederGenerator.generateCustomEntityPutInfinite(0) - val httpConf = Settings.httpAppConf - - val scnToRun = scenario("PUT custom entities") - .feed(feeder) - .exec(EntityScenarios.putEntity) - - /* - val scnToRun = scenario("POST custom entities") - .feed(feeder) - .doIfOrElse(session => session("token").as[String].nonEmpty(session)) { - exec(EntityScenarios.postEntityWithToken) - } { - exec(EntityScenarios.postEntity) - } -*/ - - - setUp(scnToRun.inject( - rampUsers(Settings.rampUsers) over Settings.rampTime, - constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration - ).protocols(httpConf)).maxDuration(Settings.holdDuration) - -}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 2b91785..0000000 --- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/PutUsersSimulation.scala +++ /dev/null @@ -1,56 +0,0 @@ -/* - * - * * Licensed to the Apache Software Foundation (ASF) under one or more - * * contributor license agreements. 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. For additional information regarding - * * copyright in this work, please see the NOTICE file in the top level - * * directory of this distribution. - * - */ - -package org.apache.usergrid.simulations.deprecated - -import io.gatling.core.Predef._ -import io.gatling.core.scenario.Simulation -import org.apache.usergrid.helpers.Setup -import org.apache.usergrid.scenarios.UserScenarios -import org.apache.usergrid.settings.Settings - -/** - * PUTS application users continually to an application. Expects the following parameters - * - * -DmaxPossibleUsers : The maximum number of users to be making requests as fast as possible. Think of this as conccurrent users in the system - * -DrampTime: The amount of time (in seconds) to allow for maxPossibleUsers to be reached. This will add new users linearlly - * -Dduration: The amount of time (in seconds) to continue to perform requests up with the maxPossibleUsers - */ -class PutUsersSimulation extends Simulation { - - println("Begin setup") - Setup.setupOrg() - Setup.setupApplication() - println("End Setup") - - - setUp( - UserScenarios.putUsersInfinitely - .inject( - /** - * injection steps take from this forum post - * https://groups.google.com/forum/#!topic/gatling/JfYHaWCbA-w - */ - rampUsers(Settings.rampUsers) over Settings.rampTime, - constantUsersPerSec(Settings.constantUsersPerSec) during Settings.constantUsersDuration - - )).protocols(Settings.httpAppConf.acceptHeader("application/json")) - -} http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 0e40004..0000000 --- a/stack/loadtests/src/main/scala/org/apache/usergrid/simulations/deprecated/SetupSimulation.scala +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * * Licensed to the Apache Software Foundation (ASF) under one or more - * * contributor license agreements. 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. For additional information regarding - * * copyright in this work, please see the NOTICE file in the top level - * * directory of this distribution. - * - */ - -package org.apache.usergrid.simulations.deprecated - -import io.gatling.core.Predef._ -import org.apache.usergrid.helpers.Setup -import org.apache.usergrid.scenarios.UserScenarios -import org.apache.usergrid.settings.Settings - -import scala.concurrent.duration._ - -class SetupSimulation extends Simulation{ - - println("Begin setup") - Setup.setupOrg() - Setup.setupApplication() - Setup.setupNotifier() - println("End Setup") - - setUp( - UserScenarios.createUsersWithDevicesScenario - .inject(splitUsers(Settings.rampUsers) into( rampUsers(10) over (10 seconds)) separatedBy (10 seconds)) - .protocols(Settings.httpAppConf.acceptHeader("application/json")) - ) -} http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/stack/loadtests/src/main/scripts/gatling-mvn.sh ---------------------------------------------------------------------- diff --git a/stack/loadtests/src/main/scripts/gatling-mvn.sh b/stack/loadtests/src/main/scripts/gatling-mvn.sh deleted file mode 100644 index e9087d5..0000000 --- a/stack/loadtests/src/main/scripts/gatling-mvn.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# 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. -# - -[ "$#" -eq 6 ] || die "6 arguments required, $# provided. Arguments are URL ORG APP NOTIFIERNAME NUM_USERS RAMP_TIME" - -URL="$1" -ORG="$2" -APP="$3" -NOTIFIER="$4" -USERS="$5" -RAMP="$6" -shift 6 -rm -rf usergrid -git clone https://github.com/apache/incubator-usergrid.git usergrid -cd usergrid/stack -git checkout -b two-dot-o origin/two-dot-o -cd loadtests -mvn clean install -mvn gatling:execute -Dthrottle=3000 -Dduration=300 -DnumEntities=5000 -DnumUsers=${USERS} -DrampTime=${RAMP} -Dbaseurl=${URL} -Dorg=${ORG} -Dapp=${APP} -DpushNotifier=${NOTIFIER} -DpushProvider=noop http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/stack/loadtests/src/main/scripts/gatling-ug.sh ---------------------------------------------------------------------- diff --git a/stack/loadtests/src/main/scripts/gatling-ug.sh b/stack/loadtests/src/main/scripts/gatling-ug.sh deleted file mode 100755 index 4c6bc0c..0000000 --- a/stack/loadtests/src/main/scripts/gatling-ug.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# -# 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 >&2 "$@" - exit 1 -} - -[ "$#" -eq 5 ] || die "5 arguments required, $# provided. Arguments are URL ORG APP NUM_USERS RAMP_TIME" - -OLDDIR=`pwd` -BIN_DIR=`dirname $0` -cd "${BIN_DIR}/.." && DEFAULT_GATLING_HOME=`pwd` && cd "${OLDDIR}" - -GATLING_HOME="${GATLING_HOME:=${DEFAULT_GATLING_HOME}}" -GATLING_CONF="${GATLING_CONF:=$GATLING_HOME/conf}" -URL="$1" -ORG="$2" -APP="$3" -USERS="$4" -RAMP="$5" - -#Shift off our first operation -shift 5 - -export GATLING_HOME GATLING_CONF - -echo "GATLING_HOME is set to ${GATLING_HOME}" - -curl -X POST "${URL}/usergrid/sandbox/notifiers" -d '{"name":"notifier82e05787a8c24361a2992c64436b6e6a","provider":"noop"}' - -#Add -Ds=<simulation class name> - -JAVA_OPTS="-Dthrottle=3000 -Dduration=300 -Dorg=${ORG} -Dbaseurl=${URL} -Dnotifier=notifier82e05787a8c24361a2992c64436b6e6a -DnumEntities=10000 -DnumUsers=${USERS} -DrampTime=${RAMP} -Dapp=${APP} -server -XX:+UseThreadPriorities -XX:ThreadPriorityPolicy=42 -Xms512M -Xmx512M -Xmn100M -XX:+HeapDumpOnOutOfMemoryError -XX:+AggressiveOpts -XX:+OptimizeStringConcat -XX:+UseFastAccessorMethods -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false ${JAVA_OPTS}" - -echo $JAVA_OPTS - -CLASSPATH="$GATLING_HOME/lib/*:$GATLING_CONF:$GATLING_HOME/user-files:${JAVA_CLASSPATH}" - -java $JAVA_OPTS -cp "$CLASSPATH" io.gatling.app.Gatling "$@" http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/stack/loadtests/src/test/resources/dummyAuditUuid.csv ---------------------------------------------------------------------- diff --git a/stack/loadtests/src/test/resources/dummyAuditUuid.csv b/stack/loadtests/src/test/resources/dummyAuditUuid.csv deleted file mode 100644 index 6d81339..0000000 --- a/stack/loadtests/src/test/resources/dummyAuditUuid.csv +++ /dev/null @@ -1 +0,0 @@ -collection,name,uuid,modified http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/stack/loadtests/src/test/resources/dummyUuid.csv ---------------------------------------------------------------------- diff --git a/stack/loadtests/src/test/resources/dummyUuid.csv b/stack/loadtests/src/test/resources/dummyUuid.csv deleted file mode 100644 index 187f36b..0000000 --- a/stack/loadtests/src/test/resources/dummyUuid.csv +++ /dev/null @@ -1 +0,0 @@ -name,uuid http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index ad07de5..0000000 --- a/stack/loadtests/src/test/resources/gatling.conf +++ /dev/null @@ -1,150 +0,0 @@ -######################### -# Gatling Configuration # -######################### - -# This file contains all the settings configurable for Gatling with their default values - -gatling { - core { - #outputDirectoryBaseName = "" # The prefix for each simulation result folder (then suffixed by the report generation timestamp) - #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) - #mute = false # When set to true, don't ask for simulation name nor run description (currently only used by Gatling SBT plugin) - - extract { - regex { - #cacheMaxCapacity = 200 # Cache size for the compiled regexes, set to 0 to disable caching - } - xpath { - #cacheMaxCapacity = 200 # Cache size for the compiled XPath queries, set to 0 to disable caching - } - jsonPath { - #cacheMaxCapacity = 200 # Cache size for the compiled jsonPath queries, set to 0 to disable caching - #preferJackson = false # When set to true, prefer Jackson over Boon for JSON-related operations - jackson { - #allowComments = false # Allow comments in JSON files - #allowUnquotedFieldNames = false # Allow unquoted JSON fields names - #allowSingleQuotes = false # Allow single quoted JSON field names - } - - } - css { - #cacheMaxCapacity = 200 # Cache size for the compiled CSS selectors queries, set to 0 to disable caching - } - } - - timeOut { - #simulation = 8640000 # Absolute timeout, in seconds, of a simulation - } - directory { - #data = user-files/data # Folder where user's data (e.g. files used by Feeders) is located - #requestBodies = user-files/request-bodies # Folder where request bodies are located - #simulations = user-files/simulations # Folder where the bundle's simulations are located - simulations = src/main/scala # Folder where the bundle's simulations are located - #reportsOnly = "" # If set, name of report folder to look for in order to generate its report - #binaries = "" # If set, name of the folder where compiles classes are located - #results = results # Name of the folder where all reports folder are located - } - } - charting { - #noReports = false # When set to true, don't generate HTML reports - #maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports - #accuracy = 10 # Accuracy, in milliseconds, of the report's stats - indicators { - #lowerBound = 800 # Lower bound for the requests' response time to track in the reports and the console summary - #higherBound = 1200 # Higher bound for the requests' response time to track in the reports and the console summary - #percentile1 = 95 # Value for the first percentile to track in the reports, the console summary and GraphiteDataWriter - #percentile2 = 99 # Value for the second percentile to track in the reports, the console summary and GraphiteDataWriter - } - } - http { - #elFileBodiesCacheMaxCapacity = 200 # Cache size for request body EL templates, set to 0 to disable - #rawFileBodiesCacheMaxCapacity = 200 # Cache size for request body Raw templates, set to 0 to disable - #fetchedCssCacheMaxCapacity = 200 # Cache size for CSS parsed content, set to 0 to disable - #fetchedHtmlCacheMaxCapacity = 200 # Cache size for HTML parsed content, set to 0 to disable - #redirectPerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent redirects, set to 0 to disable - #expirePerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent 'Expire' headers, set to 0 to disable - #lastModifiedPerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent 'Last-Modified' headers, set to 0 to disable - #etagPerUserCacheMaxCapacity = 200 # Per virtual user cache size for permanent ETag headers, set to 0 to disable - #warmUpUrl = "http://goo.gl/pq1Xwu" # The URL to use to warm-up the HTTP stack (blank means disabled) - ssl { - trustStore { - #type = "" # Type of SSLContext's TrustManagers store - #file = "" # Location of SSLContext's TrustManagers store - #password = "" # Password for SSLContext's TrustManagers store - #algorithm = "" # Algorithm used by SSLContext's TrustManagers store - } - keyStore { - #type = "" # Type of SSLContext's KeyManagers store - #file = "" # Location of SSLContext's KeyManagers store - #password = "" # Password for SSLContext's KeyManagers store - #algorithm = "" # Algorithm used SSLContext's KeyManagers store - } - } - ahc { - #allowPoolingConnections = true # Allow pooling HTTP connections (keep-alive header automatically added) - #allowPoolingSslConnections = true # Allow pooling HTTPS connections (keep-alive header automatically added) - #compressionEnforced = false # Enforce gzip/deflate when Accept-Encoding header is not defined - #connectTimeout = 60000 # Timeout when establishing a connection - #pooledConnectionIdleTimeout = 60000 # Timeout when a connection stays unused in the pool - #readTimeout = 60000 # Timeout when a used connection stays idle - #connectionTTL = -1 # Max duration a connection can stay open (-1 means no limit) - #ioThreadMultiplier = 2 # Number of Netty worker threads per core - #maxConnectionsPerHost = -1 # Max number of connections per host (-1 means no limit) - #maxConnections = -1 # Max number of connections (-1 means no limit) - #maxRetry = 0 # Number of times that a request should be tried again - #requestTimeout = 60000 # Timeout of the requests - #useProxyProperties = false # When set to true, supports standard Proxy System properties - #webSocketTimeout = 60000 # Timeout when a used websocket connection stays idle - #useRelativeURIsWithConnectProxies = true # When set to true, use relative URIs when talking with an SSL proxy or a WebSocket proxy - #acceptAnyCertificate = true # When set to true, doesn't validate SSL certificates - #httpClientCodecMaxInitialLineLength = 4096 # Maximum length of the initial line of the response (e.g. "HTTP/1.0 200 OK") - #httpClientCodecMaxHeaderSize = 8192 # Maximum size, in bytes, of each request's headers - #httpClientCodecMaxChunkSize = 8192 # Maximum length of the content or each chunk - #keepEncodingHeader = true # Don't drop Encoding response header after decoding - #webSocketMaxFrameSize = 10240 # Maximum frame payload size - } - } - data { - #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 = true # When set to true, displays a light version without detailed request stats - } - file { - #bufferSize = 8192 # FileDataWriter's internal data buffer size, in bytes - } - leak { - #noActivityTimeout = 30 # Period, in seconds, for which Gatling may have no activity before considering a leak may be happening - } - jdbc { - db { - #url = "jdbc:mysql://localhost:3306/temp" # The JDBC URL used by the JDBC DataWriter - #username = "root" # The database user used by the JDBC DataWriter - #password = "123123q" # The password for the specified user - } - #bufferSize = 20 # The size for each batch of SQL inserts to send to the database - create { - #createRunRecordTable = "CREATE TABLE IF NOT EXISTS `RunRecords` ( `id` INT NOT NULL AUTO_INCREMENT , `runDate` DATETIME NULL , `simulationId` VARCHAR(45) NULL , `runDescription` VARCHAR(45) NULL , PRIMARY KEY (`id`) )" - #createRequestRecordTable = "CREATE TABLE IF NOT EXISTS `RequestRecords` (`id` int(11) NOT NULL AUTO_INCREMENT, `runId` int DEFAULT NULL, `scenario` varchar(45) DEFAULT NULL, `userId` VARCHAR(20) NULL, `name` varchar(50) DEFAULT NULL, `requestStartDate` bigint DEFAULT NULL, `requestEndDate` bigint DEFAULT NULL, `responseStartDate` bigint DEFAULT NULL, `responseEndDate` bigint DEFAULT NULL, `status` varchar(2) DEFAULT NULL, `message` varchar(4500) DEFAULT NULL, `responseTime` bigint DEFAULT NULL, PRIMARY KEY (`id`) )" - #createScenarioRecordTable = "CREATE TABLE IF NOT EXISTS `ScenarioRecords` (`id` int(11) NOT NULL AUTO_INCREMENT, `runId` int DEFAULT NULL, `scenarioName` varchar(45) DEFAULT NULL, `userId` VARCHAR(20) NULL, `event` varchar(50) DEFAULT NULL, `startDate` bigint DEFAULT NULL, `endDate` bigint DEFAULT NULL, PRIMARY KEY (`id`) )" - #createGroupRecordTable = "CREATE TABLE IF NOT EXISTS `GroupRecords` (`id` int(11) NOT NULL AUTO_INCREMENT, `runId` int DEFAULT NULL, `scenarioName` varchar(45) DEFAULT NULL, `userId` VARCHAR(20) NULL, `entryDate` bigint DEFAULT NULL, `exitDate` bigint DEFAULT NULL, `status` varchar(2) DEFAULT NULL, PRIMARY KEY (`id`) )" - } - insert { - #insertRunRecord = "INSERT INTO RunRecords (runDate, simulationId, runDescription) VALUES (?,?,?)" - #insertRequestRecord = "INSERT INTO RequestRecords (runId, scenario, userId, name, requestStartDate, requestEndDate, responseStartDate, responseEndDate, status, message, responseTime) VALUES (?,?,?,?,?,?,?,?,?,?,?)" - #insertScenarioRecord = "INSERT INTO ScenarioRecords (runId, scenarioName, userId, event, startDate, endDate) VALUES (?,?,?,?,?,?)" - #insertGroupRecord = "INSERT INTO GroupRecords (runId, scenarioName, userId, entryDate, exitDate, status) VALUES (?,?,?,?,?,?)" - } - } - graphite { - #light = false # only send the all* stats - #host = "localhost" # The host where the Carbon server is located - #port = 2003 # The port to which the Carbon server listens to - #protocol = "tcp" # The protocol used to send data to Carbon (currently supported : "tcp", "udp") - #rootPathPrefix = "gatling" # The common prefix of all metrics sent to Graphite - #bufferSize = 8192 # GraphiteDataWriter's internal data buffer size, in bytes - } - } -} http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index c0b7024..0000000 --- a/stack/loadtests/src/test/resources/logback-test.xml +++ /dev/null @@ -1,39 +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. - */ ---> -<configuration> - - <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern> - <immediateFlush>false</immediateFlush> - </encoder> - </appender> - - <!-- 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" level="TRACE" /> --> - - <root level="WARN"> - <appender-ref ref="CONSOLE" /> - </root> - -</configuration> http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 3299ee6..0000000 --- a/stack/loadtests/src/test/resources/logback.xml +++ /dev/null @@ -1,38 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -/* - * 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. - */ ---> -<configuration> - - <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern> - <immediateFlush>false</immediateFlush> - </encoder> - </appender> - - <!-- 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" /> --> - - <root level="WARN"> - <appender-ref ref="CONSOLE" /> - </root> - -</configuration> http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/stack/loadtests/src/test/resources/recorder.conf ---------------------------------------------------------------------- diff --git a/stack/loadtests/src/test/resources/recorder.conf b/stack/loadtests/src/test/resources/recorder.conf deleted file mode 100644 index 6c2366e..0000000 --- a/stack/loadtests/src/test/resources/recorder.conf +++ /dev/null @@ -1,37 +0,0 @@ -recorder { - core { - #encoding = "utf-8" # The encoding used for reading/writing request bodies and the generated simulation - #outputFolder = "" # The folder where generated simulation will we written - #package = "" # The package's name of the generated simulation - #className = "RecordedSimulation" # The name of the generated Simulation class - #thresholdForPauseCreation = 100 # The minimum time, in milliseconds, that must pass between requests to trigger a pause creation - #saveConfig = false # When set to true, the configuration from the Recorder GUI overwrites this configuration - } - filters { - #filterStrategy = "Disabled" # The selected filter resources filter strategy (currently supported : "Disabled", "BlackList", "WhiteList") - #whitelist = [] # The list of ressources patterns that are part of the Recorder's whitelist - #blacklist = [] # The list of ressources patterns that are part of the Recorder's blacklist - } - http { - #automaticReferer = true # When set to false, write the referer + enable 'disableAutoReferer' in the generated simulation - #followRedirect = true # When set to false, write redirect requests + enable 'disableFollowRedirect' in the generated simulation - #removeConditionalCache = true # When set to true, removes from the generated requests headers leading to request caching - #inferHtmlResources = true # When set to true, add inferred resources + set 'inferHtmlResources' with the configured blacklist/whitelist in the generated simulation - } - proxy { - #port = 8000 # Local port used by Gatling's Proxy for HTTP/HTTPS - outgoing { - #host = "" # The outgoing proxy's hostname - #username = "" # The username to use to connect to the outgoing proxy - #password = "" # The password corresponding to the user to use to connect to the outgoing proxy - #port = 0 # The HTTP port to use to connect to the outgoing proxy - #sslPort = 0 # If set, The HTTPS port to use to connect to the outgoing proxy - } - } - netty { - #maxInitialLineLength = 10000 # Maximum length of the initial line of the response (e.g. "HTTP/1.0 200 OK") - #maxHeaderSize = 20000 # Maximum size, in bytes, of each request's headers - #maxChunkSize = 8192 # Maximum length of the content or each chunk - #maxContentLength = 100000000 # Maximum length of the aggregated content of each response - } -} http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 3044095..0000000 --- a/stack/loadtests/src/test/scala/Engine.scala +++ /dev/null @@ -1,29 +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. - */ -import io.gatling.app.Gatling -import io.gatling.core.config.GatlingPropertiesBuilder - -object Engine extends App { - - val props = new GatlingPropertiesBuilder - props.dataDirectory(IDEPathHelper.dataDirectory.toString) - props.resultsDirectory(IDEPathHelper.resultsDirectory.toString) - props.bodiesDirectory(IDEPathHelper.bodiesDirectory.toString) - props.binariesDirectory(IDEPathHelper.mavenBinariesDirectory.toString) - - Gatling.fromMap(props.build) -} http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 8b29d41..0000000 --- a/stack/loadtests/src/test/scala/IDEPathHelper.scala +++ /dev/null @@ -1,38 +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. - */ -import java.nio.file.Path - -import io.gatling.core.util.PathHelper._ - -object IDEPathHelper { - - 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" - val mavenTargetDirectory = projectRootDir / "target" - val mavenBinariesDirectory = mavenTargetDirectory / "test-classes" - - val dataDirectory = mavenResourcesDirectory / "data" - val bodiesDirectory = mavenResourcesDirectory / "bodies" - - val recorderOutputDirectory = mavenSourcesDirectory - val resultsDirectory = mavenTargetDirectory / "results" - - val recorderConfigFile = mavenResourcesDirectory / "recorder.conf" -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/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 deleted file mode 100644 index 8467603..0000000 --- a/stack/loadtests/src/test/scala/Recorder.scala +++ /dev/null @@ -1,28 +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. - */ -import io.gatling.recorder.GatlingRecorder -import io.gatling.recorder.config.RecorderPropertiesBuilder - -object Recorder extends App { - - val props = new RecorderPropertiesBuilder - props.simulationOutputFolder(IDEPathHelper.recorderOutputDirectory.toString) - props.simulationPackage("${package}") - props.bodiesFolder(IDEPathHelper.bodiesDirectory.toString) - - GatlingRecorder.fromMap(props.build, Some(IDEPathHelper.recorderConfigFile)) -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid/blob/29bf682e/stack/loadtests/testConfig.sh ---------------------------------------------------------------------- diff --git a/stack/loadtests/testConfig.sh b/stack/loadtests/testConfig.sh deleted file mode 100755 index 4aa5aa6..0000000 --- a/stack/loadtests/testConfig.sh +++ /dev/null @@ -1,68 +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. -# - -#### -# Configuration for tests -#### - -URL="http://localhost:8080" -ADMIN_USER=superuser -ADMIN_PASSWORD=test - -ENTITY_WORKER_NUM=1 -ENTITY_WORKER_COUNT=1 - -ORG=gatling -APP=millionentities - -AUTH_TYPE=token -TOKEN_TYPE=management - -CREATE_ORG=false -CREATE_APP=false -LOAD_ENTITIES=false -SANDBOX_COLLECTION=true -NUM_ENTITIES=10000 -SKIP_SETUP=false - -COLLECTION=thousands -ENTITY_TYPE=trivialSortable -ENTITY_PREFIX=sortable -ENTITY_SEED=0 - -SEARCH_QUERY=order%20by%20sortField%20desc -SEARCH_LIMIT=1000 -RETRY_COUNT=0 -LATER_THAN_TIMESTAMP=0 -ENTITY_PROGRESS_COUNT=1000 - -END_CONDITION_TYPE=minutesElapsed -#END_CONDITION_TYPE=requestCount -END_MINUTES=5 -END_REQUEST_COUNT=100 - -CONSTANT_USERS_PER_SEC=0 -CONSTANT_USERS_DURATION=10 - -INJECTION_LIST="rampUsers(100,300);nothingFor(300)" - -PRINT_FAILED_REQUESTS=true - -GET_VIA_QUERY=false -QUERY_PARAMS= - -FLUSH_CSV=10000 -NEW_CSV_ON_FLUSH=true -USERGRID_REGION=