locust breaking changes
This commit is contained in:
@@ -38,8 +38,8 @@ fi
|
||||
echo "Starting $CLIENTS clients for ${RUN_TIME:-ever}"
|
||||
if [ "$SILENT" -eq 1 ]
|
||||
then
|
||||
locust -f robot-shop.py --host "$HOST" --no-web -r 1 -c $NUM_CLIENTS $TIME > /dev/null 2>&1
|
||||
locust -f robot-shop.py --host "$HOST" --headless -r 1 -u $NUM_CLIENTS $TIME > /dev/null 2>&1
|
||||
else
|
||||
locust -f robot-shop.py --host "$HOST" --no-web -r 1 -c $NUM_CLIENTS $TIME
|
||||
locust -f robot-shop.py --host "$HOST" --headless -r 1 -u $NUM_CLIENTS $TIME
|
||||
fi
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
locustio
|
||||
locust
|
||||
|
@@ -1,9 +1,11 @@
|
||||
import os
|
||||
from locust import HttpLocust, TaskSet, task
|
||||
from locust import HttpUser, task, between
|
||||
from random import choice
|
||||
from random import randint
|
||||
|
||||
class UserBehavior(TaskSet):
|
||||
class UserBehavior(HttpUser):
|
||||
wait_time = between(2, 10)
|
||||
|
||||
def on_start(self):
|
||||
""" on_start is called when a Locust start before any task is scheduled """
|
||||
print('Starting')
|
||||
@@ -69,7 +71,3 @@ class UserBehavior(TaskSet):
|
||||
self.client.post('/api/payment/pay/partner-57', json=cart)
|
||||
|
||||
|
||||
class WebsiteUser(HttpLocust):
|
||||
task_set = UserBehavior
|
||||
min_wait = 1000
|
||||
max_wait = 5000
|
||||
|
Reference in New Issue
Block a user