loadgenerator: complete implementation

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2018-06-29 17:10:28 -07:00
parent 08aa1cce26
commit 257cbdf98b
4 changed files with 26 additions and 5 deletions

View file

@ -4,4 +4,4 @@ COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
ENTRYPOINT locust --host="http://${FRONTEND_ADDR}" --no-web -c=10
ENTRYPOINT ./loadgen.sh

10
src/loadgenerator/loadgen.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
set -e
if [[ -z "${FRONTEND_ADDR}" ]]; then
echo >&2 "FRONTEND_ADDR not specified"
exit 1
fi
set -x
locust --host="http://${FRONTEND_ADDR}" --no-web -c "${USERS:-10}"

View file

@ -63,4 +63,4 @@ class UserBehavior(TaskSet):
class WebsiteUser(HttpLocust):
task_set = UserBehavior
min_wait = 1000
max_wait = 2000
max_wait = 10000