measure(metrics:options:block:)
Records the selected metrics, using the specified measurement options, for a block of code.
Declaration
func measure(metrics: [any XCTMetric], options: XCTMeasureOptions, block: () -> Void)Parameters
- metrics:
An array of metrics to measure, like CPU, memory, or elapsed time.
- options:
Options to control the gathering of performance measurements.
- block:
A block whose performance is measured.