---
title: XCTMemoryMetric
framework: xctest
role: symbol
role_heading: Class
path: xctest/xctmemorymetric
---

# XCTMemoryMetric

A metric to record the physical memory that a performance test uses.

## Declaration

```swift
class XCTMemoryMetric
```

## Overview

Overview XCTMemoryMetric compares the memory use before and after running the block argument to measure(metrics:block:), and reports the difference.

## Topics

### Initializers

- [init()](xctest/xctmemorymetric/init().md)
- [init(application:)](xctest/xctmemorymetric/init(application:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [XCTMetric](xctest/xctmetric.md)

## See Also

### Measurement Metrics

- [XCTMetric](xctest/xctmetric.md)
- [XCTCPUMetric](xctest/xctcpumetric.md)
- [XCTClockMetric](xctest/xctclockmetric.md)
- [XCTHitchMetric](xctest/xcthitchmetric.md)
- [XCTOSSignpostMetric](xctest/xctossignpostmetric.md)
- [XCTStorageMetric](xctest/xctstoragemetric.md)
- [XCTApplicationLaunchMetric](xctest/xctapplicationlaunchmetric.md)
