Skip to content

Commit daa8d38

Browse files
authored
Merge pull request #1940 from ahoppen/ahoppen/fix-performance-test
Change `#if os(Darwin)` to `#if os(macOS)` in performanc test
2 parents bef63d8 + c5759e5 commit daa8d38

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Tests/PerformanceTest/InstructionsCountAssertion.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ func measureInstructions(_ baselineName: StaticString = #function, block: () ->
3030
let numberOfInstructions = endInstructions - startInstructions
3131
let strippedBaselineName = "\(baselineName)".replacingOccurrences(of: "()", with: "")
3232

33-
#if os(Darwin)
33+
// Performance testing is only supported on macOS.
34+
// On all other platforms `getInstructionsExecuted` returns 0.
35+
#if os(macOS)
3436
// If the is no data, we just continue the test
3537
guard let data = try? Data(contentsOf: baselineURL) else {
3638
return

0 commit comments

Comments
 (0)