How can I run my performance tests more than ten times?

前端 未结 4 1765
星月不相逢
星月不相逢 2021-02-12 05:59

By default Xcodes performance tests are run ten times and my result is the average of those ten tests. The problem is the averaged result varies considerably each time I run it

4条回答
  •  野性不改
    2021-02-12 06:14

    I typically expand the Standard Deviation value to include the range I'd accept.

    One obvious workaround for you is to perform the operation 5 times within the measure block you are executing. (You'll want to change the expected time.)

        measure {
            for _ in [1...5] {
                // ...
            }
        }
    

提交回复
热议问题