How to calculate percentage improvement in response time for performance testing

后端 未结 7 2042
梦如初夏
梦如初夏 2021-01-29 19:55

How should I calculate the percentage improvement in response time.

I am getting 15306 ms response time for old code and 799 ms response for th

相关标签:
7条回答
  • 2021-01-29 20:46

    There are two ways to interpret "percentage improvement in response time". One is the classic and ubiquitous formula for computing a percentage change in a data point from an old value to a new value, which looks like this:

    (new - old)/old*100%
    

    So for your case:

    (799 - 15306)/15306*100% = -94.78%
    

    That means the new value is 94.78% smaller (faster, since we're talking about response time) than the old value.

    The second way of interpreting the statement is to take the percentage of the old value that the new value "covers" or "reaches":

    new/old*100%
    

    For your case:

    799/15306*100% = 5.22%
    

    That means the new value is just 5.22% of the old value, which, for response time, means it takes just 5.22% of the time to respond, compared to the old response time.

    The use of the word "improvement" suggests that you want the 94.78% value, as that shows how much of the lag in the old response time was eliminated ("improved") by the new code. But when it comes to natural language, it can be difficult to be certain about precise meaning without careful clarification.

    0 讨论(0)
提交回复
热议问题