我正在使用 Locust(现代开源负载测试工具) 进行 API 负载测试。
由于是模拟+分析
工具,有些名词我看不懂。
下面是我在 API 上所做的测试的屏幕截图。
我想了解的术语:
要模拟的用户数量与孵化率(生成的用户/秒)之间的关系
。- 从上图中,
Median (ms), Average (ms), Content Size(bytes)的含义
。 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/