<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTPerformanceMetric",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:@T@XCTPerformanceMetric"
  },
  "title" : "XCTPerformanceMetric"
}
-->

# XCTPerformanceMetric

Performance metrics that the test records.

```
struct XCTPerformanceMetric
```

## Topics

### Measuring Elapsed Time

[`static let wallClockTime: XCTPerformanceMetric`](/documentation/XCTest/XCTPerformanceMetric/wallClockTime)

A performance metric that records the time in seconds to execute a block of code.

### Initializing an Item

[`init(String)`](/documentation/XCTest/XCTPerformanceMetric/init(_:))

Creates a new instance with the specified raw value.

[`init(rawValue: String)`](/documentation/XCTest/XCTPerformanceMetric/init(rawValue:))

Creates a new instance with the specified raw value.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)