<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTMetric/reportMeasurements(from:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(pl)XCTMetric(im)reportMeasurementsFromStartTime:toEndTime:error:"
  },
  "title" : "reportMeasurements(from:to:)"
}
-->

# reportMeasurements(from:to:)

Reports the measurements gathered for a metric between specific timestamps.

```
func reportMeasurements(from startTime: XCTPerformanceMeasurementTimestamp, to endTime: XCTPerformanceMeasurementTimestamp) throws -> [XCTPerformanceMeasurement]
```

## Parameters

`startTime`

A timestamp that represents the time at which the measured code began to execute.

`endTime`

A timestamp that represents the time at which the measured code finished executing.

## Return Value

An array of the measurements gathered by this metric during the requested interval.

## Discussion

Report the measurements gathered during the execution of measured code in a performance test. Use the `startTime` and `endTime` parameters to refine the accuracy of the reported measurements.

---

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)