1. 安装

    a. 安装Python

    b. 安装Locust,通过“pip install locust”

    c. 安装 pyzmq,通过“pip install pyzmq”

    d. 安装完成,通过“locust -help”验证一下

 

2. locust压测百度首页,先创建“Locust_test1.py”文档

Locust使用

进入Locust_test1.py目录下,运行“ locust -f Locust_test1.py --host=https://www.baidu.com”

再用浏览器打开“http://localhost:8089”,进入Locust性能测试界面

Locust使用

 Number of users to simulate 设置模拟用户数

 Hatch rate (users spawned/second) 每秒产生(启动)的用户数。

 点击Start swarming 开始运行性能测试。

Locust使用

 

相关文章:

  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-03-09
  • 2021-12-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
  • 2021-05-17
  • 2021-10-22
  • 2021-06-20
  • 2022-12-23
相关资源
相似解决方案