Locust支持在同一台机器上开启多进程执行压测,以Master和Slave的模式,各Slave将最终结果呈现在Master Web管理页面。
locust -f locust_files/my_locust_file.py --master --host=http://example.com
locust -f locust_files/my_locust_file.py --slave --host=http://example.com
启动Master
在命令行执行命令locust -f locust_files/my_locust_file.py --master --host=http://example.com
启动Slave
再启动一个新的命令行进程,执行命令locust -f locust_files/my_locust_file.py --slave --host=http://example.com
如果需要多个Slave,那么就再启动新的命令行
Master 页面管理