File "D:\Program Files\python\lib\site-packages\pip\_vendor\urllib3\response.p
y", line 336, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files
.pythonhosted.org', port=443): Read timed out.
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' comm
and
locust的介绍和实际应用
jmeter和locust的区别
Locust安装步骤:
解决方案:去D:\Program Files\python\Lib\site-packages目录下把pip-18.0.1.dist-info删除,再次运行
python -m pip install --upgrade pip
后升级成功。再次执行命令pip install locust 报pip连接超时:
解决方案网址:https://blog.csdn.net/qq_39161804/article/details/81191977
最终使用命令 pip --default-timeout=1000 install locust 设置了pip下载超时时间为1000秒,最后安装成功。
使用locust -help验证是否安装成功。
测试脚本编写
具体实例:
启动locust服务
在浏览器中输入localhost:8089,进入flask库生成的web页面,查看压测过程的数据
测试结果说明:
还可以通过命令行的方式去运行
启动参数:
运行完后会在当前目录下生成两个压测结果