mirror of
https://github.com/librecaptcha/lc-core.git
synced 2025-01-27 13:03:12 -05:00
reduce number of users in locust stress test
by reducing wait time, we can generate same load with fewer users
This commit is contained in:
parent
e8416ff70e
commit
79428bc5e7
@ -19,7 +19,7 @@ def _(environment, **kw):
|
|||||||
environment.process_exit_code = 0
|
environment.process_exit_code = 0
|
||||||
|
|
||||||
class QuickStartUser(SequentialTaskSet):
|
class QuickStartUser(SequentialTaskSet):
|
||||||
wait_time = between(0.1,1)
|
wait_time = between(0.1,0.2)
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def captcha(self):
|
def captcha(self):
|
||||||
@ -52,6 +52,6 @@ class QuickStartUser(SequentialTaskSet):
|
|||||||
|
|
||||||
|
|
||||||
class User(FastHttpUser):
|
class User(FastHttpUser):
|
||||||
wait_time = between(0.1,1)
|
wait_time = between(0.1,0.2)
|
||||||
tasks = [QuickStartUser]
|
tasks = [QuickStartUser]
|
||||||
host = "http://localhost:8888"
|
host = "http://localhost:8888"
|
||||||
|
@ -7,7 +7,7 @@ java -jar target/scala-2.13/LibreCaptcha.jar &
|
|||||||
JAVA_PID=$!
|
JAVA_PID=$!
|
||||||
sleep 4
|
sleep 4
|
||||||
|
|
||||||
locust --headless -u 1000 -r 100 --run-time 4m --stop-timeout 30 -f tests/locustfile.py
|
locust --headless -u 300 -r 100 --run-time 4m --stop-timeout 30 -f tests/locustfile.py
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
kill $JAVA_PID
|
kill $JAVA_PID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user