python - Locust Load Testing 分析后术语的含义

标签 python testing load-testing locust

我正在使用 Locust(现代开源负载测试工具) 进行 API 负载测试。
由于是模拟+分析工具,有些名词我看不懂。
下面是我在 API 上所做的测试的屏幕截图。

Test Run

我想了解的术语:

  1. 要模拟的用户数量与孵化率(生成的用户/秒)之间的关系
  2. 从上图中,Median (ms), Average (ms), Content Size(bytes)的含义
  3. min_wait, max_wait,我们在WebsiteUser(HttpLocust)类中用自己的值覆盖的变量名,min_wait, max_wait的意义。

接下来,在Charts标签中,Locust显示了3个图表,分别是(Total Requests/Second, Response Time (ms), Number of Users)
无法理解这些图表,
Total Requests/Second 中,我是否应该查看与时间有关的峰值,因为它是用户数与时间图
我如何理解所有图表?

谢谢。
这是一个广泛的问题,但我需要了解这些术语,以便更好地理解图表和分析后得到的数据。

最佳答案

The relationship between Number of users to simulate Vs Hatch Rate (Users Spawned/Second).

您定义要以给定速率产生的用户(蝗虫)数量。 这让您可以控制用户涌入的速度。例如,100 个用户以 5 用户/秒的速度,将需要 100/5=20 秒才能达到 100 个用户。

From the above image, the meaning of Median (ms), Average (ms), Content Size(bytes).

给定 api 端点的中值、平均响应时间,在整个测试时间内。内容大小是端点返回数据的大小。

min_wait, max_wait, the name of the variables which we override with own values in the WebsiteUser(HttpLocust) class, the significance of min_wait, max_wait.

请引用doc .

Next, in the Charts tab, Locust shows 3 graphs, namely (Total Requests/Second, Response Time (ms), Number of Users). Not able to make sense of this charts, In Total Requests/Second, should I look at peaks with respect to time as it is Number of Users Vs Time Graphs?

它们是总 RPS 数、响应时间和用户数,计算所有端点实时显示。峰值响应时间特别值得关注,因为您应该调查那个时间点发生的事情(新用户太多?RPS 激增?)

关于python - Locust Load Testing 分析后术语的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53096366/

相关文章:

python - 如何在使用自定义用户模型时修复 django admin 中的 "cannot unpack non-iterable NoneType object"错误

python - 彭博 API 的 Pandas 包装器?

python - 如何运行作为我在 AWS SSH session 中上传的应用程序的一部分的 Python 脚本?

.net - 检查测试中的 Resharper 代码问题

function - react 组件中的测试方法不起作用

python - 如何防止 Django fixtures 与现有数据冲突

java - 使用 Maven 进行自动化负载测试的经过尝试和测试的方法

jmeter - 如何在 Jmeter 中强制运行一次 Controller

websocket - 如何对 websocket 进行负载测试

javascript - 通过 package.json 名称导入当前包导出