from locust import Locust, TaskSet, task class UserBehavior(TaskSet): @task def job(self): pass class User(Locust): task_set = UserBehavior min_wait = 1000 max_wait = 3000
mars@mars-Ideapad-V460:~/test$ locust [2015-09-12 10:46:36,876] mars-Ideapad-V460/INFO/locust.main: Starting web monitor at *:8089 [2015-09-12 10:46:36,919] mars-Ideapad-V460/INFO/locust.main: Starting Locust 0.7.3
然后在浏览器中访问localhost:8089,弹出如下页面:
第一行Number of users to simulate是模拟用户的数量,第二行Hatch rate (users spawned/second表示产生模拟用户的速度,所有用户产生完后开始测试统计,填写完成后点击“Start swarming”即可开始测试:
以上就是Python3.6性能测试框架Locust安装与使用详解(图)的详细内容,更多请关注Gxl网其它相关文章!
查看更多关于Python3.6性能测试框架Locust安装与使用详解(图)的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did81710