Skip to content

Commit 1237f9a

Browse files
committed
Make --exclude-ns actually work correctly
1 parent eb64036 commit 1237f9a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/RegexBenchmark/CLI.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ struct Runner: ParsableCommand {
3131

3232
mutating func run() throws {
3333
var runner = BenchmarkRunner.makeRunner(samples, outputPath)
34-
35-
if excludeNs {
36-
self.specificBenchmarks.append("((?!NS).)*")
37-
}
38-
34+
3935
if !self.specificBenchmarks.isEmpty {
4036
runner.suite = runner.suite.filter { b in
4137
specificBenchmarks.contains { pattern in
@@ -44,6 +40,10 @@ struct Runner: ParsableCommand {
4440
}
4541
}
4642

43+
if excludeNs {
44+
runner.suite = runner.suite.filter { b in !b.name.contains("NS") }
45+
}
46+
4747
switch (profile, debug) {
4848
case (true, true): print("Cannot run both profile and debug")
4949
case (true, false): runner.profile()

0 commit comments

Comments
 (0)