XCTAssertCpuIdentifier

public enum XCTAssertCpuIdentifier
extension XCTAssertCpuIdentifier: XCTAssertMetricIdentifier

Identifies the type of CPU statistic you want to make assertion for in a performance test.

XCTCPUMetric captures statistics about CPU activity while the block argument to a measure(metrics:block:) call runs in a performance test. To make assertion to these statistics use any of the values of XCTAssertCpuIdentifier.

  • CPU time is the length of time, in seconds, that the CPU is active and executing instructions for the measured target.

    Declaration

    Swift

    case time
  • CPU cycles is the number of clock cycles that occur while the CPU is active and executing instructions for the measured target.

    Declaration

    Swift

    case cycles
  • CPU instructions retired is the number of processor instructions that run to completion during execution of the measured target.

    Declaration

    Swift

    case instructionsRetired
  • Declaration

    Swift

    public typealias RelatedMetric = XCTCPUMetric
  • Declaration

    Swift

    public var identifier: String { get }