How to calculate percentage improvement in response time for performance testing

后端 未结 7 2058
梦如初夏
梦如初夏 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:42

    your code's runtime is 94.78% shorter/improved/decreased:

    (new - old) / old x 100%
    (799 - 15306) / 15306 x 100% =~ -94.78% (minus represents decrease)
    

    your code is 1816% faster:

    (old - new) / new x 100%
    (15306 - 799) / 799 x 100% =~ 1816%
    

提交回复
热议问题