updated loadgen.sh and locustfile.py according to locust v1.0 changes

This commit is contained in:
Adrien Afl 2020-06-05 01:22:13 +02:00
parent 147ca5a4a0
commit c750c4e69d
2 changed files with 4 additions and 4 deletions

View file

@ -32,4 +32,4 @@ if test $STATUSCODE -ne 200; then
fi fi
# else, run loadgen # else, run loadgen
locust --host="http://${FRONTEND_ADDR}" --no-web -c "${USERS:-10}" 2>&1 locust --host="http://${FRONTEND_ADDR}" --headless -u "${USERS:-10}" -r "${RATE:-10}" 2>&1

View file

@ -15,7 +15,7 @@
# limitations under the License. # limitations under the License.
import random import random
from locust import HttpLocust, TaskSet, between from locust import HttpUser, TaskSet, between
products = [ products = [
'0PUK6V6EV0', '0PUK6V6EV0',
@ -76,6 +76,6 @@ class UserBehavior(TaskSet):
viewCart: 3, viewCart: 3,
checkout: 1} checkout: 1}
class WebsiteUser(HttpLocust): class WebsiteUser(HttpUser):
task_set = UserBehavior tasks = [UserBehavior]
wait_time = between(1, 10) wait_time = between(1, 10)