<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestCase/defaultMetrics",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(cs)XCTestCase(cpy)defaultMetrics"
  },
  "title" : "defaultMetrics"
}
-->

# defaultMetrics

An array of default metrics the test uses to record performance.

```
class var defaultMetrics: [any XCTMetric] { get }
```

## Discussion

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

---

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)