Python性能测试工具Locust安装及使用

(编辑:jimmy 日期: 2024/9/21 浏览:2)

介绍

An open source load testing tool.

一个开源性能测试工具。

define user behaviour with python code, and swarm your system with millions of simultaneous users.

使用Python代码来定义用户行为。用它可以模拟百万计的并发用户访问你的系统。

官方网站:http://locust.io/

Locust安装

1、安装Python:

官方:https://www.python.org/

安装Python2 或Python3

2、安装Locuse

2.1, 通过pip命令安装 /> pip install locustio

2.2, 通过GitHub上克隆项目安装(Python3推荐):https://github.com/locustio/locust

3、安装 pyzmq

If you intend to run Locust distributed across multiple processes/machines, we recommend you to also install pyzmq.

如果你打算运行Locust 分布在多个进程/机器,我们建议你也安装pyzmq.

通过pip命令安装。 /> pip install pyzmq

4、安装成功,CMD敲入命令验证。 /> locust --help

快速使用

(一)Locust 介绍

(二)Locust 安装

(三)Locust 创建性能测试

(四)Locust no-...

(五)Locust 参数说明

(六)Locust 分布式运行

(七)Locust 的类和方法

(八)Locust 设置断言

(九)Locust 参数化

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。