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

前端 未结 4 1763
星月不相逢
星月不相逢 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:16

    The short answer: No, there is no current interface exposed to allow a measure block more than ten times.

    The longer answer: No, but there is an interface exposed to modify certain metrics of the measure block. The default metrics are in a String array returned from defaultPerformanceMetrics. There appears to only be one metric supported right now: XCTPerformanceMetric_WallClockTime. This only specifies a performance metric that records the time in seconds between calls to a performance test's startMeasuring() and stopMeasuring() methods, and not the number of times the block is run.

提交回复
热议问题