美文网首页
Locust 官方文档 7:以逐步加载模式运行

Locust 官方文档 7:以逐步加载模式运行

作者: 猫与测试 | 来源:发表于2020-12-20 13:04 被阅读0次

--step-load 在 Locust 1.3 版本中已弃用

If you want to monitor your service performance with different user load and probe the max tps that can be achieved, you can run Locust with Step Load enabled with --step-load:

如果你想要用不同的用户负载,来监视服务性能并探究可以达到的最大 tps,你可以使用逐步加载的方式来运行 Locust。

你可以通过 --step-load 参数实现逐步加载:

$ locust -f locust_files/my_locust_file.py --step-load

Options

--step-load

Enable Step Load mode to monitor how performance metrics varies when user load increases.

启用 “逐步加载” 模式以监视用户负载增加时性能指标的变化。

--step-users

Client count to increase by step in Step Load mode. Only used together with --step-load.

在“逐步加载”模式下,User 数量逐步增加。仅与 --step-load 一起使用。

--step-time

Step duration in Step Load mode, e.g. (300s, 20m, 3h, 1h30m, etc.). Only used together with --step-load.

逐步加载模式的持续时间,比如(300s, 20m, 3h, 1h30m, 等)。仅与 --step-load 一起使用。

Running Locust in step load mode without the web UI

If you want to run Locust in step load mode without the web UI, you can do that with --step-users and --step-time:

如果要在没有 Web UI 的情况下以逐步加载方式运行 Locust,则可以使用 --step-users--step-time 来完成:

$ locust -f --headless -u 1000 -r 100 --run-time 1h30m --step-load --step-users 300 --step-time 20m

Locust will swarm the clients by step and shutdown once the time is up.

Locust 会逐步加载用户,并在持续时间结束是全部关闭

使用逐步加载的模式进行分布式运行

If you want to run Locust distributed in step load mode, you should specify the --step-load option when starting the master node, to swarm locusts by step.

如果你想在分布式模式下使用逐步加载模式,你需要在主节点机器指定 --step-load

It will then show the --step-users option and --step-time option in Locust UI.

将在 Locust UI 上显示 --step-users--step-time 选项。

相关文章

网友评论

      本文标题:Locust 官方文档 7:以逐步加载模式运行

      本文链接:https://www.haomeiwen.com/subject/zymtnktx.html