1. 程式人生 > >關於分析器中的90 percent

關於分析器中的90 percent

先來看一段,官方的說明:

Solution: The 90th percentile is the value for which 90% of the data points are smaller

The 90th percentile is a measure of stastical distribution, not unlike the median. The median is the middle value. The median is the value for which 50% of the values were bigger, and 50% smaller. The 90th percentile tells you the value for which 90% of the data points are smaller and 10% are bigger.

Statistically, to calculate the 90th percentile value:
1. Sort the transaction instances by their value.
2. Remove the top 10% instances.
3. The highest value left is the 90th percentile.

Example:
There are ten instances of transaction "t1" with the values 1,3,2,4,5,20,7,8,9,6 (in sec).
1. Sort by value -- 1,2,3,4,5,6,7,8,9,20.
2. Remove top 10 % -- remove the value "20."
3. The highest value left is the 90th percentile -- 9 is the 90th percentile value.

The 90th percentile value answers the question, "What percentage of my transactions have a response time less than or equal to the 90th percentile value?" Given the above information, here is how LoadRunner calculates the 90th percentile.

In Analysis 6.5:
The values for the transaction are ordered in a list.
The 90% is taken from the ordered list of values. The place from which it is taken is

   Rounding to the small value the number: 0.9 * (Number of Values - 1) + 1

In Analysis 7 and above:
Each value is counted in a range of values. For example, 5 can be counted in a range of 4.95 to 5.05, 7.2 in a range of 7.15 to 7.25. The 90% is taken from the range of values that the number of transaction in it and before it is >= ( 0.9 * Number of Values).

This difference in the methods can lead to different 90% values. Again, both methods lead to correct values as defined by the 90th percentile. However, the algorithm to calculate these figures has changed in LoadRunner 7 and above.


依照我的理解是這樣的,它只是一個統計響應時間的引數。這個事務所有的執行次數中,90%的次數落在這個響應時間裡。這個引數在tools-option裡面是可以修改的,從而界定一個響應時間的範圍,比如:
一個事務運行了10次時間分別如下:
12.3  15.4   15.9  16.6  17.8 18.5  19.5 20.5 21.5 22.5 (我隨便寫的數字哈)
那麼這個90 percent 的值是21.5,即有10%個響應時間大於它,90%的時間小於或等於它。

那麼,這個界定時間的統計值有什麼作用呢?

我大概這樣想的,如果這個值很大(我這裡拿90%來說),那麼就只說明瞭有很多事務響應時間很大,而這是個模糊而籠統的值。如果我定義到50%,且得到的值挺小,那對於效能來說又說明了什麼?
如果我們只來分析大於這個界定值的點,也就是說,哪些響應時間大於這個值(因為可以定義所以當它大的時候我們把它能調小,再來和我們的要求達到一致),我們就只來分析這個點以上的響應時間的原因,就可以儘快分析出系統的瓶頸所在(當然這個也不是肯定的,因為瓶頸的分析要依賴很多方面的資訊)。