You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code,i set the stop_timeout =10。When I run it in distributed mode, the vitrual user will become to 0 after 10 seconds. But the rps also become to 0.
Environment settings (for bug reports)
OS:
Python version: 3.7.1
Locust version: 0.9.0
code is below:
from locust import HttpLocust,TaskSet,task,runners,main,stats,events
import time,os,json
class UserBehavior(TaskSet):
@task(1)
def job11(self):
start_time = time.time()
head = {'token':'165c8b3a345540669765ce7c913a7558'}
with self.client.get("/mock/14962/account/userLogin",catch_response=True) as response:
#response_time = int((time.time() - start_time) * 1000)
#if response_time>3000:
# response.failure(response_time)
if response.status_code==200:
try:
res=response.json()
result=res['result']
if result==False or 'data' not in res.keys():
response.failure(res)
except:
response.failure("no data")
class WebUser(HttpLocust):
task_set = UserBehavior
start_time = time.time()
host = "http://yapi.demo.qunar.com"
min_wait = 0
max_wait = 0
stop_timeout = 10
The text was updated successfully, but these errors were encountered:
Description of issue / feature request
In my code,i set the stop_timeout =10。When I run it in distributed mode, the vitrual user will become to 0 after 10 seconds. But the rps also become to 0.
Environment settings (for bug reports)
code is below:
The text was updated successfully, but these errors were encountered: