LoadRunner性能测试--90%响应时间

来源:互联网 发布:2016日本进出口数据 编辑:程序博客网 时间:2024/06/06 03:38

LoadRunner--90%响应时间

先看看之前官方的一段说明:

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.
PS:这里有点类似某些比赛的评分规则中,去掉最高分;
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. 

由此可见,仅仅有平均事务响应时间是不够的。因为平均事务响应时间满足了性能需求,未必就表示系统的性能已经满足了绝大多数用户的要求。

假如有两组测试结果,响应时间分别是 {1,3,5,10,16} 和 {5,6,7,8,9},它们的平均值都是7,你认为哪次测试的结果更理想?

所以

1)90%响应时间它是统计响应时间的参数,带有统计学意义,是科学性的;

2)可以这样理解,这个事务所有的运行次数中,90%的次数落在这个响应时间里;

3)90%响应时间可以在LoadRunner中根据需要进行自由设置的,例如70%,95%;

4)为了真实的评估软件性能,建议让测试场景执行较长的时间,让工具采集更多数据,数据越多,在概率论中的数据分布中看,最具有真实性;

5)该参数是性能测试结果的一个算法,与测试工具无关,无论你是使用LoadRunner、JMeter或其它性能测试工具,该理论同样适用。

 

http://blog.csdn.net/xifeijian/article/details/8723922

0 0