90th Percentile in Performance Testing

90th Percentile in Performance Testing

Percentile is a phrase that is frequently used yet is very crucial, particularly in performance assessment. We were aware of the 90th percentile as soon as we began reviewing any information on performance testing. Even our mentor placed greater emphasis on the response time data in the 90th percentile. So what precisely is this 90th percentile?

Let’s use an illustration to attempt to explain. If you had ten sheep, and each one consumed a few kilograms of grass each day. You once measured the grass and recorded the amounts that each sheep consumed. Please see the table below:

Sheep#S1S2S3S4S5S6S7S8S9S10
Grass(kg)33.244.83.62.93.433.83.9

You must now ascertain how much grass 90% of sheep have devoured. Simply disregard the final value and order the number according to the amount of grass consumed.

Simply disregard S4 with 4.8 (keep it hungry for a few days, it eats so much; the 90th percentile value in 10 entries is a 9th value, which is 4).

The result is that 90% of all sheep either consume 4 kilograms of grass or less, giving you a maximum allowable intake of grass. Performance testing requires that you discard 10% of the overall count with high values after sorting the response times of various transactions or requests in ascending order. The 90th percentile will be the last highest value among the remaining values.

Example:

A performance test script is executed for 25 iterations. The response time of the login transaction of each iteration is:

S. No.Iteration No.Login (Response Time (in sec))
111.5
221.6
331.1
440.9
552.1
661.9
771.4
881
990.8
10101.5
11111.8
12121.1
13131.6
14141.7
15151.3
16160.9
17171
18181.5
19192.3
20201.9
21211.8
22221.2
23231.4
24240.9
25251.5

Now, sort the list in increasing order with respect to response time.

S. No.Iteration No.Login (Response Time)
190.8
240.9
3160.9
4240.9
581
6171
731.1
8121.1
9221.2
10151.3
1171.4
12231.4
1311.5
14101.5
15181.5
16251.5
1721.6
18131.6
19141.7
20111.8
21211.8
2261.9
23201.9
2452.1
25192.3

How 90th percentile calculated in MS Excel?

90th Percentile = 0.9 * (Number of Values – 1) + 1

Why do we need the 90th percentile in Performance Testing?

  • Percentile is frequently used as a performance benchmark. If the 90th percentile NFR for the specified SLA is met during the test, it indicates that 90% of users receive an experience that is consistent with your performance objectives. The customer feels more confident about his application as a result.
  • Individual datasets can sometimes look normal while the average reaction time appears to be abnormally high. Even a single peak in response times might affect the test’s results and distort the average response time statistics. In these cases, the 90th percentile (or other percentile values) strips the result of the unexpected spike data.
  • A statistician would describe the curve as having a long tail because the majority of applications really have very few big spikes on the graph. A long tail indicates a few transactions that are significantly slower than average rather than many sluggish transactions. The 90th Percentile is useful in this situation since it excludes the 10% of requests with the spike (which may be disregarded).
  • If the median (50th percentile) response time is 5 seconds, 50% of transactions will be completed in or under 5 seconds. If a transaction’s 90th percentile time is 8 seconds, just 10% of transactions are slower than that, and 90% are as quick or faster. around this situation, the average might either be less than 5 seconds or somewhere around the middle. Because it displays a portion of the response time curve, a percentile provides a far better picture of real-world performance.
  • The distribution of distinct data points may be estimated if we compute the difference between the 90th percentile value and the average response time value and divide this difference by the average response time value. If the ratio is quite tiny, it signifies that the average and 90th percentile values are fairly similar, which will signify that the application is performing well and consistently. A significant variance in reaction time and inconsistent performance of the application are indicated by a big ratio, though. The 90th percentile is helpful in this strategy, but I advise you to derive your conclusions only based on standard deviation.

Conclusion

A pretty good and simple technique to comprehend the actual performance characteristics of your application is through percentiles. They also offer a fantastic foundation for automated base-lining, application behavior learning, and properly focusing application optimization. Averages are useless, though, as they are oversimplified and one-dimensional.  In the realm of performance testing, the percentile (90th, 95th, and 99th) is excellent!

Scroll to Top