LocustIO:未应用min_wait和max_wait [英] LocustIO: min_wait and max_wait not being applied
问题描述
我在LocustIO周围玩耍.我有一个self.client.get()
任务,我的min_wait
和max_wait
分别设置为1毫秒.
I am playing around LocustIO. I have a single self.client.get()
task with my min_wait
and max_wait
were set to be 1 millisecond each.
class App_User(HttpLocust):
...
min_wait = 1
max_wait = 1
我正在使用logging
来查看响应.我期望在控制台中,给定max_wait
为1毫秒,任务日志的时间戳将在同一秒之内,但是任务似乎每隔1秒运行一次.
I was using logging
to see the response. I am expecting in console that timestamps of the task logs will be within the same second given a max_wait
of 1 millisecond but it seems that the task runs every 1 second still.
在给定1毫秒的任务等待时间的情况下,在1秒的负载测试期内期望1000个GET
响应是错误的;还要有1个模拟用户吗?
Is it wrong to expect a 1000 GET
responses within a 1 second load test period given 1 millisecond task wait; 1 simulated user as well?
推荐答案
1ms是2个请求之间的等待时间.因此,您的服务器可能需要1秒才能做出响应.如果您希望每秒收到更多请求,则应添加更多"App_User".
1ms is the wait time between 2 requests. So it's likely that your server takes 1s to respond. If you want to have more requests per seconds, you should add more "App_User".
此外,您的测试机可能无法以如此高的速度发出请求,而我的可怜的PC只能执行不到70次.在此阶段,您需要蝗虫群.
Also, your test machine may not be able to shoot requests at that high rate, my poor PC can only do less than 70. At this stage, you need a locust swarm.
最后,需要注意的重要一件事是Locust并非设计为具有固定的RPS,其目标是模拟用户行为.
Finally, one important thing to notice is that Locust is not designed to have a fixed RPS, its goal is to simulate user behavior.
这篇关于LocustIO:未应用min_wait和max_wait的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!