<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestCase/defaultPerformanceMetrics",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTestCase(cpy)defaultPerformanceMetrics"
  },
  "title" : "defaultPerformanceMetrics"
}
-->

# defaultPerformanceMetrics

An array of default performance metrics the test records.

```
class var defaultPerformanceMetrics: [XCTPerformanceMetric] { get }
```

## Discussion

When you call [`measure(_:)`](/documentation/XCTest/XCTestCase/measure(_:)), the test uses this property to determine which performance metrics to record. The default is an array that contains [`wallClockTime`](/documentation/XCTest/XCTPerformanceMetric/wallClockTime). Subclasses of [`XCTestCase`](/documentation/XCTest/XCTestCase) can override this method to change the behavior of [`measure(_:)`](/documentation/XCTest/XCTestCase/measure(_:)).

## See Also

[`wallClockTime`](/documentation/XCTest/XCTPerformanceMetric/wallClockTime)

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



---

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)