Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Sources/NIOSSHPerformanceTester/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ import NIOSSH

// MARK: Test Harness

var warning: String = ""
var _warning: String = ""
assert({
print("======================================================")
print("= YOU ARE RUNNING NIOPerformanceTester IN DEBUG MODE =")
print("======================================================")
warning = " <<< DEBUG MODE >>>"
_warning = " <<< DEBUG MODE >>>"
return true
}())
let warning = _warning

public func measure(_ fn: () throws -> Int) rethrows -> [TimeInterval] {
func measureOne(_ fn: () throws -> Int) rethrows -> TimeInterval {
Expand All @@ -46,7 +47,7 @@ public func measure(_ fn: () throws -> Int) rethrows -> [TimeInterval] {
return measurements
}

let limitSet = CommandLine.arguments.dropFirst()
let limitSet = ProcessInfo.processInfo.arguments.dropFirst()

public func measureAndPrint(desc: String, fn: () throws -> Int) rethrows {
if limitSet.count == 0 || limitSet.contains(desc) {
Expand Down
Loading