Performance testing best practices when doing TDD?

后端 未结 9 986
轻奢々
轻奢々 2021-02-04 12:30

I\'m working on a project which is in serious need of some performance tuning.

How do I write a test that fails if my optimizations do not in improve the speed of the pr

9条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 13:30

    First you need to establish some criteria for acceptable performance, then you need to devise a test that will fail that criteria when using the existing code, then you need to tweak your code for performance until it passes the test. You will probably have more than one criteria for performance, and you should certainly have more than one test.

提交回复
热议问题