This gatling script allow you to qualify and stress an Pelias Server
The Testing scenario is the following:
- Each user will randomly select a region in the regions.csv file (round-robin strategy)
- In this region, the user will randomly choose one positions (lat/lng)
- Then, the user will request and get the address at this positions
- Java : https://adoptopenjdk.net/
- Scala : http://www.scala-lang.org/download/
Scala plugin for IntelliJ platform also helps.
This script has been tested and approved by both Gatling and Gatling Frontline solutions.
- Clone the project
git clone https://github.com/jawg/pelias-server-stress.git
sh - Set your environment properties in {projectRoot}/src/main/resources Properties are server.url, simulation.users.count...
- Browse the project root and execute the following commands
./gradlew shadowJar
to build the project - Now you can generate seeds for all simulated users with this command
GENERATE_SEEDS=true ./bin/pelias-server-stress
. Skip this step if you want to use a custom seeds file or keep the previous one and produce the exact same test - In order to run the stress test use
./bin/pelias-server-stress
.
You can override properties with environment variables when you use the script pelias-server-stress
.
Available arguments are:
oa
oropenaddresses
: Run the openaddresses scenario. This needs openaddresses data (OA_FILE
).pip
orpip-service
: Run the PIP service scenario. This needsREGION_FILE
.reverse
(default): Run the reverse geocoding scenario. This needsREGION_FILE
.
Available environments are:
GATLING_PROPERTIES
: Path to your custom property fileSERVER_URL
: Set your custon server URLREGIONS_FILE
: Where your region file isOA_FILE
: Where your openaddresses file isSEEDS_FILE
: Where your seeds fileAUTOCOMPLETE
: Set it to true if you wants autocomplete endpoint instead of search (only for openaddresses scenario)USERS_COUNT
: Set users count for your simulation (and number of seeds)USERS_RAMP_TIME
: Set the ramp time for your usersGENERATE_SEEDS
: When not empty, will generate only seedsAUTO_GENERATE_SEEDS
: When not empty, will generate seed and run the simulation
A docker image is also available docker build -t jawg/pelias-server-stress .
or docker pull jawg/pelias-server-streess
Simple openaddresses run: docker run -ti --rm -e OA_FILE=/path/to/oa.csv jawg/pelias-server-streess oa
Copyright 2017-2020 Jawg
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.