这个是我在学习测试的时候做的一个自动化性能脚本,使用到了聚合报告,用来查看我们的测试结果分析:
name上面的每个字段表示的是什么意思呢?
首先来看下Jmeter的help是如何解释这些含义的。
1、Label - The label of the sample. If "Include group name in label?" is selected, then the name of the thread group is added as a prefix. This allows identical labels from different thread groups to be collated separately if required.
2、 Samples - The number of samples with the same label
3、Average - The average time of a set of results
4、Median - The median is the time in the middle of a set of results. 50% of the samples took no more than this time; the remainder took at least as long。
5、90% Line - 90% of the samples took no more than this time. The remaining samples took at least as long as this. (90th percentile)
6、95% Line - 95% of the samples took no more than this time. The remaining samples took at least as long as this. (95th percentile)
7、99% Line - 99% of the samples took no more than this time. The remaining samples took at least as long as this. (99th percentile)
8、Min - The shortest time for the samples with the same label
9、Max - The longest time for the samples with the same label
10、Error % - Percent of requests with errors
11、Throughput - the Throughput is measured in requests per second/minute/hour. The time unit is chosen so that the displayed rate is at least 1.0. When the throughput is saved to a CSV file, it is expressed in requests/second, i.e. 30.0 requests/minute is saved as 0.5.
12、Received KB/sec - The throughput measured in received Kilobytes per second
13、Sent KB/sec - The throughput measured in sent Kilobytes per second
然后看一下我翻译过后自己的解释:
聚合报告:Aggregate Report
Label:每个JMeter的element的Name值。例如HTTP Request的Name
#Samples:发出请求数量。如第三行记录,模拟20个用户,循环100次,所以显示了2000
Average:平均响应时间(单位:)。默认是单个Request的平均响应时间,当使用了Transaction Controller时,也可以以Transaction为单位显示平均响应时间
Median:中位数,也就是50%用户的响应时间
90%Line:90%用户的响应时间
95%Line:95%用户的响应时间
99%Line:99%用户的响应时间
注:为什么要有*%用户响应时间?因为在评估一次测试的结果时,仅仅有平均事物响应时间是不够的。假如有一次测试,总共有100个请求被响应,其中最小响应时间为0.02秒,最大响应时间为110秒,平均事务响应时间为4.7秒,你会不会想到最小和最大响应时间如此大的偏差是否会导致平均值本身并不可信?
我们可以在95 th之后继续添加96/ 97/ 98/ 99/ 99.9/ 99.99 th,并利用Excel的图表功能画一条曲线,来更加清晰表现出系统响应时间的分布情况。这时候你也许会发现,那个最大值的出现几率只不过是千分之一甚至万分之一,而且99%的用户请求的响应时间都是在性能需求所定义的范围之内的;如下图则是最低响应时间的值出现几率是很小的,实际99%的用户请求响应时间都要20000+。
Min:最小响应时间
Max:最大响应时间
Error%:本次测试中出现错误的请求的数量/请求的总数
Throughput:吞吐量。默认情况下标示每秒完成的请求数(具体单位如下图)
KB/sec:每秒从服务器端接收到的数据量。