51Testing软件测试论坛

标题: 关于分析器中的90 percent [打印本页]

作者: Zee    时间: 2006-4-17 13:19
标题: 关于分析器中的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%,且得到的值挺小,那对于性能来说又说明了什么?
如果我们只来分析大于这个界定值的点,也就是说,哪些响应时间大于这个值(因为可以定义所以当它大的时候我们把它能调小,再来和我们的要求达到一致),我们就只来分析这个点以上的响应时间的原因,就可以尽快分析出系统的瓶颈所在(当然这个也不是肯定的,因为瓶颈的分析要依赖很多方面的信息)。

不知道坛子上兄弟姐妹们是怎么来理解的?能通过它再联系到其他的什么信息呢?

[ 本帖最后由 Zee 于 2006-4-17 13:47 编辑 ]
作者: beiyu95    时间: 2006-4-17 16:47
90%是统计学中的概念吧,去掉10%的极值(考虑到异常数据的出现,使数据的整体可信度更高,可以参考数理统计有关内容),然后计算均值。
作者: Zee    时间: 2006-4-17 19:43
不是计算均值的,我认为,它只是用来界定响应时间的,它不参与运算。
作者: beiyu95    时间: 2006-4-18 09:58
昨天没仔细看官方的说明,现在也没都看,看看这几句就得了,我的理解确实不太对。
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.

翻译一下:
按如下统计方法来计算90%的值:
1.对事务按值排序;
2.去掉10%最大值;
3.剩下的值中,最大的就是要计算的90%。

OK?不需要再讨论了吧。
作者: Zee    时间: 2006-4-18 11:38
我想讨论的不是这个值是怎么得来的,如楼上兄弟所言,这个值就是去掉10%的最大值,剩下的响应时间最大值就是这个90 percent的值了

我想讨论的是这个值有什么意义?请看一楼最后一句。
作者: beiyu95    时间: 2006-4-18 13:28
执行完90%的事务所用的时间。
作者: beiyu95    时间: 2006-4-18 13:32
“LR中事务响应时间(百分比)图分析在给定的时间范围内执行的事务的百分比。此图可以帮助您确定合适的事务的百分比,以符合您的系统的性能标准。通常情况下,您需要在可接受的响应时间范围内,确定事务百分比。最大响应时间可能非常长,但如果大多数事务具有可以接受的响应时间,则整个系统还是适用的。”以上文字来自LR8.1中文版手册,希望对你有所帮助。
作者: Zee    时间: 2006-4-18 13:38
我明白这个值是用来干吗的了。谢谢beiyu95。
作者: beiyu95    时间: 2006-4-18 14:59
共同学习,我自己也是才搞清楚。提出有价值的问题才是最重要的,解决问题次之。
作者: shengyan    时间: 2006-6-7 17:15
beiyu95 loadrunner8.1的中文手册能共享一下吗?
谢谢
作者: viviv_wang    时间: 2007-1-23 12:10
同问:这个值的意义在那里呢?如果去掉10%的极值,剩下90%的数,是不是从90%里面再次取个90%?弄明白这个才算完整吧?
作者: ppent    时间: 2007-1-30 14:23
看来我以前的理解也是错误的。
我一直以为是将10%的异常值去除后剩下90%的数据用以体现更有意义的数据。但LR只是将最大的10%去掉了,这么说最小的数据不属于异常值了。这个数据对于评估测试系统的可接受度有很大的参考意义。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2