You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/swift-parser-cli/swift-parser-cli.swift
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,7 @@ class SwiftParserCli: ParsableCommand {
79
79
staticvarconfiguration=CommandConfiguration(
80
80
abstract:"Utility to test SwiftSyntax syntax tree creation.",
81
81
subcommands:[
82
+
PerformanceTest.self,
82
83
PrintDiags.self,
83
84
PrintTree.self,
84
85
Reduce.self,
@@ -148,6 +149,41 @@ class VerifyRoundTrip: ParsableCommand {
148
149
}
149
150
}
150
151
152
+
classPerformanceTest:ParsableCommand{
153
+
staticvarconfiguration=CommandConfiguration(
154
+
commandName:"performance-test",
155
+
abstract:"Parse all .swift files in '--directory' and its subdirectories '--iteration' times and output the average time (in milliseconds) one iteration took."
156
+
)
157
+
158
+
requiredinit(){}
159
+
160
+
@Option(help:"The directory in which all .swift files should be parsed")
161
+
vardirectory:String
162
+
163
+
@Option(help:"How many times should the directory be parsed?")
0 commit comments