Skip to content

Commit

Permalink
fix parse time arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Oct 24, 2023
1 parent e0a1248 commit eb6d5cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "ScheduleSample schedule.zip sample.ipf.zip AAPL 2012-05-26-14:15:00"
argument = "ScheduleSample schedule.zip sample.ipf.zip -f AAPL 2012-05-26-14:15:00"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
Expand All @@ -76,7 +76,7 @@
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "Connect demo.dxfeed.com:7300 quote AAPL,IBM"
argument = "Connect demo.dxfeed.com:7300 quote AAPL -f 2012-05-26-14:15:00"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
Expand Down
7 changes: 3 additions & 4 deletions Samples/PerfTestCL/Arguments.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ class Arguments {
}()

public lazy var time: String? = {
if arguments.count > 4 {
return arguments[4]
} else {
return nil
if let tapeIndex = arguments.firstIndex(of: "-f") {
return arguments[tapeIndex + 1]
}
return nil
}()

init(_ cmd: [String], requiredNumberOfArguments: Int) throws {
Expand Down

0 comments on commit eb6d5cf

Please sign in to comment.