@@ -198,70 +198,6 @@ public bool? NoSyncEnabled
198198 }
199199 }
200200
201- /// <summary>
202- /// Commandline for linux client side.
203- /// </summary>
204- public string CommandLineLinuxClient
205- {
206- get
207- {
208- return this . Parameters . GetValue < string > ( nameof ( this . CommandLineLinuxClient ) ) ;
209- }
210-
211- set
212- {
213- this . Parameters [ nameof ( this . CommandLineLinuxClient ) ] = value ;
214- }
215- }
216-
217- /// <summary>
218- /// Commandline for linux server side.
219- /// </summary>
220- public string CommandLineLinuxServer
221- {
222- get
223- {
224- return this . Parameters . GetValue < string > ( nameof ( this . CommandLineLinuxServer ) ) ;
225- }
226-
227- set
228- {
229- this . Parameters [ nameof ( this . CommandLineLinuxServer ) ] = value ;
230- }
231- }
232-
233- /// <summary>
234- /// Commandline for windows client side.
235- /// </summary>
236- public string CommandLineWindowsClient
237- {
238- get
239- {
240- return this . Parameters . GetValue < string > ( nameof ( this . CommandLineWindowsClient ) ) ;
241- }
242-
243- set
244- {
245- this . Parameters [ nameof ( this . CommandLineWindowsClient ) ] = value ;
246- }
247- }
248-
249- /// <summary>
250- /// Commandline for windows server side.
251- /// </summary>
252- public string CommandLineWindowsServer
253- {
254- get
255- {
256- return this . Parameters . GetValue < string > ( nameof ( this . CommandLineWindowsServer ) ) ;
257- }
258-
259- set
260- {
261- this . Parameters [ nameof ( this . CommandLineWindowsServer ) ] = value ;
262- }
263- }
264-
265201 /// <summary>
266202 /// The retry policy to apply to the startup of the NTttcp workload to handle
267203 /// transient issues.
@@ -320,9 +256,9 @@ protected override Task InitializeAsync(EventContext telemetryContext, Cancellat
320256 protected override string GetCommandLineArguments ( )
321257 {
322258 string command = null ;
323- if ( this . Platform == PlatformID . Win32NT )
259+ if ( this . Platform == PlatformID . Win32NT && this . IsInClientRole )
324260 {
325- command = this . GetWindowsSpecificCommandLine ( ) ;
261+ command = this . CommandLineWindowsClient ;
326262 }
327263 else if ( this . Platform == PlatformID . Unix )
328264 {
@@ -600,50 +536,6 @@ private void IntializeWindowsClientCommandline()
600536 }
601537 }
602538
603- private void IntializeWindowsServerCommandline ( )
604- {
605- string serverIPAddress = this . GetLayoutClientInstances ( ClientRole . Server ) . First ( ) . IPAddress ;
606- if ( ! this . CommandLineWindowsServer . Contains ( "-r" ) && ! this . CommandLineWindowsServer . Contains ( "-s" ) )
607- {
608- this . CommandLineWindowsServer = this . CommandLineWindowsServer + " -r" ;
609- }
610-
611- if ( ! this . CommandLineWindowsServer . Contains ( "-t" ) && this . TestDuration != null )
612- {
613- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ " -t { this . TestDuration . TotalSeconds } ";
614- }
615-
616- if ( ! this . CommandLineWindowsServer . Contains ( "-l" ) && this . BufferSizeServer != null )
617- {
618- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ " -l { this . BufferSizeServer } ";
619- }
620-
621- if ( ! this . CommandLineWindowsServer . Contains ( "-p" ) )
622- {
623- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ " -p { this . Port } ";
624- }
625-
626- if ( ! this . CommandLineWindowsServer . Contains ( "-xml" ) && this . ResultsPath != null )
627- {
628- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ " -xml { this . ResultsPath } ";
629- }
630-
631- if ( ! this . CommandLineWindowsServer . Contains ( "-u" ) && this . Protocol != null )
632- {
633- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ "{ ( this . Protocol . ToLowerInvariant ( ) == "udp" ? " -u" : string . Empty ) } ";
634- }
635-
636- if ( ! this . CommandLineWindowsServer . Contains ( "-ns" ) && this . NoSyncEnabled != null )
637- {
638- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ "{ ( this . NoSyncEnabled == true ? " -ns" : string . Empty ) } ";
639- }
640-
641- if ( ! this . CommandLineWindowsServer . Contains ( "-m" ) )
642- {
643- this . CommandLineWindowsServer = this . CommandLineWindowsServer + $ "-m { this . ThreadCount } ,*,{ serverIPAddress } ";
644- }
645- }
646-
647539 private void IntializeLinuxClientCommandline ( )
648540 {
649541 string serverIPAddress = this . GetLayoutClientInstances ( ClientRole . Server ) . First ( ) . IPAddress ;
@@ -696,12 +588,12 @@ private void IntializeLinuxClientCommandline()
696588
697589 if ( ! this . CommandLineLinuxClient . Contains ( "-n" ) )
698590 {
699- this . CommandLineLinuxClient = this . CommandLineLinuxClient + $ "{ ( ( this . ThreadsPerServerPort != null ) ? $ " -n { this . ThreadsPerServerPort } " : string . Empty ) } ";
591+ this . CommandLineLinuxClient = this . CommandLineLinuxClient + $ "{ ( ( this . ThreadsPerServerPort != null ) ? $ " -n { this . ThreadsPerServerPort } " : string . Empty ) } ";
700592 }
701593
702594 if ( ! this . CommandLineLinuxClient . Contains ( "-l" ) )
703595 {
704- this . CommandLineLinuxClient = this . CommandLineLinuxClient + $ "{ ( ( this . ConnectionsPerThread != null ) ? $ " -l { this . ConnectionsPerThread } " : string . Empty ) } "
596+ this . CommandLineLinuxClient = this . CommandLineLinuxClient + $ "{ ( ( this . ConnectionsPerThread != null ) ? $ " -l { this . ConnectionsPerThread } " : string . Empty ) } ";
705597 }
706598
707599 if ( ! this . CommandLineLinuxClient . Contains ( "-N" ) && this . NoSyncEnabled != null )
0 commit comments