---
title: iterationCount
framework: xctest
role: symbol
role_heading: Instance Property
path: xctest/xctmeasureoptions/iterationcount
---

# iterationCount

The number of times the performance test measures its block.

## Declaration

```swift
var iterationCount: Int { get set }
```

## Discussion

Discussion A performance test runs its block iterationCount+1 times, ignoring the first iteration and recording metrics for the remaining iterations. The test ignores the first iteration to reduce measurement variance associated with “warming up” caches and other first-run behavior.

## See Also

### Using Option Details

- [invocationOptions](xctest/xctmeasureoptions/invocationoptions-swift.property.md)
- [XCTMeasureOptions.InvocationOptions](xctest/xctmeasureoptions/invocationoptions-swift.struct.md)
