1. 程式人生 > >Jmeter-聚合報告-欄位分析

Jmeter-聚合報告-欄位分析

這個是我在學習測試的時候做的一個自動化效能指令碼,使用到了聚合報告,用來檢視我們的測試結果分析:

 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:每秒從伺服器端接收到的資料量。