性能测试P90

性能测试P90

what is p90 in software performance testing

In software performance testing, p90 (also known as the 90th percentile) is a measure of performance that represents the response time or throughput that 90% of requests or transactions fall below. It is used to identify and analyze the performance of the slowest 10% of transactions or requests.

For example, if a web application has a p90 response time of 5 seconds, it means that 90% of the requests to that application were completed in 5 seconds or less, while the remaining 10% took longer than 5 seconds.

P90 is useful in performance testing because it provides a more complete picture of performance than other measures such as average response time, which can be skewed by outliers. By measuring p90, testers can identify and address performance issues affecting the slowest transactions or requests, which can have a significant impact on the overall user experience.

在软件性能测试中,p90(也称为90分位数)是一个性能指标,表示90%的请求或事务的响应时间或吞吐量低于该值。它用于识别和分析最慢的10%的事务或请求的性能。

例如,如果一个Web应用程序的p90响应时间为5秒,这意味着该应用程序的90%的请求在5秒内完成,而剩余的10%需要更长的时间才能完成。

P90在性能测试中非常有用,因为它提供比其他指标如平均响应时间更全面的性能信息,平均响应时间容易受到极端值的影响。通过测量p90,测试人员可以识别和解决影响最慢事务或请求的性能问题,这可以对整体用户体验产生重大影响。

formula to calculate p90 for performance testing
  1. The formula to calculate the P90 in performance testing is as follows:

  2. Sort the list of values in ascending order.

  3. Calculate the total number of values (n).

Calculate the index (i) of the value that represents the 90th percentile:

i = (90 / 100) * n

Note: if the value of i is not an integer, you need to round it up to the nearest integer.

  1. Find the value at the i-th position in the sorted list. This value is the P90.

For example, if you have a list of response times (in milliseconds) for a web page, such as [50, 60, 70, 80, 90, 100, 110, 120, 130, 140], the P90 can be calculated as follows:

  1. Sort the list in ascending order: [50, 60, 70, 80, 90, 100, 110, 120, 130, 140].

  2. Calculate the total number of values (n) which is 10.

  3. Calculate the index (i) of the 90th percentile:

i = (90 / 100) * n
= (90 / 100) * 10
= 9
  1. Find the value at the 9th position in the sorted list, which is 130. Therefore, the P90 for this set of response times is 130 milliseconds.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值