loadgenerator: complete implementation
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
08aa1cce26
commit
257cbdf98b
4 changed files with 26 additions and 5 deletions
|
@ -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
10
src/loadgenerator/loadgen.sh
Executable 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}"
|
|
@ -63,4 +63,4 @@ class UserBehavior(TaskSet):
|
|||
class WebsiteUser(HttpLocust):
|
||||
task_set = UserBehavior
|
||||
min_wait = 1000
|
||||
max_wait = 2000
|
||||
max_wait = 10000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue