Skip to content

Commit 8c2ac6a

Browse files
authored
Merge pull request swiftlang#2241 from ahoppen/ahoppen/remove-self-parse-performance
Remove the self parse performance tests
2 parents 894fc62 + 8e9f6cb commit 8c2ac6a

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

Tests/SwiftParserTest/ParserTests.swift

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -137,45 +137,4 @@ public class ParserTests: ParserTestCase {
137137
checkDiagnostics: false
138138
)
139139
}
140-
141-
func testSelfParsePerformance() throws {
142-
try XCTSkipUnless(ProcessInfo.processInfo.environment["ENABLE_SELF_PARSE_PERFORMANCE"] == "1")
143-
144-
let sourceDir = packageDir.appendingPathComponent("Sources")
145-
let files = try FileManager.default
146-
.enumerator(at: sourceDir, includingPropertiesForKeys: nil)!
147-
.compactMap({ $0 as? URL })
148-
.filter { $0.pathExtension == "swift" }
149-
.map { try Data(contentsOf: $0) }
150-
151-
measure {
152-
for _ in 0..<10 {
153-
for file in files {
154-
file.withUnsafeBytes { buf in
155-
_ = Parser.parse(source: buf.bindMemory(to: UInt8.self))
156-
}
157-
}
158-
}
159-
}
160-
}
161-
162-
func testConcurrentSelfParsePerformance() throws {
163-
try XCTSkipUnless(ProcessInfo.processInfo.environment["ENABLE_SELF_PARSE_PERFORMANCE"] == "1")
164-
165-
let sourceDir = packageDir.appendingPathComponent("Sources")
166-
let files = try FileManager.default
167-
.enumerator(at: sourceDir, includingPropertiesForKeys: nil)!
168-
.compactMap({ $0 as? URL })
169-
.filter { $0.pathExtension == "swift" }
170-
.map { try Data(contentsOf: $0) }
171-
172-
measure {
173-
DispatchQueue.concurrentPerform(iterations: files.count * 50) { i in
174-
let file = files[i % files.count]
175-
file.withUnsafeBytes { buf in
176-
_ = Parser.parse(source: buf.bindMemory(to: UInt8.self))
177-
}
178-
}
179-
}
180-
}
181140
}

0 commit comments

Comments
 (0)