Skip to content

Commit 93a228f

Browse files
RakeshwarKRakeshwar Reddy Kambaiahgari
andauthored
Added initialization of retry policy for Networking Workload (#474)
Co-authored-by: Rakeshwar Reddy Kambaiahgari <[email protected]>
1 parent 33f2bd6 commit 93a228f

File tree

4 files changed

+6
-29
lines changed

4 files changed

+6
-29
lines changed

src/VirtualClient/VirtualClient.Actions/Network/NetworkingWorkload/CPS/CPSExecutor.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,6 @@ public CPSExecutor(VirtualClientComponent component)
3333
{
3434
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz")).Or<VirtualClientException>()
3535
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
36-
37-
this.Parameters.SetIfNotDefined(nameof(this.ConnectionDuration), 0);
38-
this.Parameters.SetIfNotDefined(nameof(this.DataTransferMode), 1);
39-
this.Parameters.SetIfNotDefined(nameof(this.DisplayInterval), 10);
40-
this.Parameters.SetIfNotDefined(nameof(this.ConnectionsPerThread), 100);
41-
this.Parameters.SetIfNotDefined(nameof(this.MaxPendingRequestsPerThread), 100);
42-
this.Parameters.SetIfNotDefined(nameof(this.Port), 7201);
43-
this.Parameters.SetIfNotDefined(nameof(this.WarmupTime), 8);
44-
this.Parameters.SetIfNotDefined(nameof(this.DelayTime), 0);
45-
this.Parameters.SetIfNotDefined(nameof(this.ConfidenceLevel), 99);
46-
this.Parameters.SetIfNotDefined(nameof(this.AdditionalParams), string.Empty);
4736
}
4837

4938
/// <summary>
@@ -57,17 +46,6 @@ public CPSExecutor(IServiceCollection dependencies, IDictionary<string, IConvert
5746
this.fileSystem = dependencies.GetService<IFileSystem>();
5847
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz")).Or<VirtualClientException>()
5948
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
60-
61-
this.Parameters.SetIfNotDefined(nameof(this.ConnectionDuration), 0);
62-
this.Parameters.SetIfNotDefined(nameof(this.DataTransferMode), 1);
63-
this.Parameters.SetIfNotDefined(nameof(this.DisplayInterval), 10);
64-
this.Parameters.SetIfNotDefined(nameof(this.ConnectionsPerThread), 100);
65-
this.Parameters.SetIfNotDefined(nameof(this.MaxPendingRequestsPerThread), 100);
66-
this.Parameters.SetIfNotDefined(nameof(this.Port), 7201);
67-
this.Parameters.SetIfNotDefined(nameof(this.WarmupTime), 8);
68-
this.Parameters.SetIfNotDefined(nameof(this.DelayTime), 0);
69-
this.Parameters.SetIfNotDefined(nameof(this.ConfidenceLevel), 99);
70-
this.Parameters.SetIfNotDefined(nameof(this.AdditionalParams), string.Empty);
7149
}
7250

7351
/// <summary>

src/VirtualClient/VirtualClient.Actions/Network/NetworkingWorkload/Latte/LatteExecutor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class LatteExecutor : NetworkingWorkloadToolExecutor
2929
public LatteExecutor(VirtualClientComponent component)
3030
: base(component)
3131
{
32+
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz_tcp_listener_open bind"))
33+
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
3234
}
3335

3436
/// <summary>

src/VirtualClient/VirtualClient.Actions/Network/NetworkingWorkload/NTttcp/NTttcpExecutor.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public class NTttcpExecutor : NetworkingWorkloadToolExecutor
3434
public NTttcpExecutor(VirtualClientComponent component)
3535
: base(component)
3636
{
37+
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz_tcp_listener_open bind"))
38+
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
3739
}
3840

3941
/// <summary>
@@ -46,9 +48,6 @@ public NTttcpExecutor(IServiceCollection dependencies, IDictionary<string, IConv
4648
{
4749
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz_tcp_listener_open bind"))
4850
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
49-
50-
this.Parameters.SetIfNotDefined(nameof(this.ThreadCount), 1);
51-
this.Parameters.SetIfNotDefined(nameof(this.TestDuration), 60);
5251
}
5352

5453
/// <summary>

src/VirtualClient/VirtualClient.Actions/Network/NetworkingWorkload/SockPerf/SockPerfExecutor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class SockPerfExecutor : NetworkingWorkloadToolExecutor
2929
public SockPerfExecutor(VirtualClientComponent component)
3030
: base(component)
3131
{
32+
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz_tcp_listener_open bind"))
33+
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
3234
}
3335

3436
/// <summary>
@@ -41,10 +43,6 @@ public SockPerfExecutor(IServiceCollection dependencies, IDictionary<string, ICo
4143
{
4244
this.ProcessStartRetryPolicy = Policy.Handle<Exception>(exc => exc.Message.Contains("sockwiz_tcp_listener_open bind"))
4345
.WaitAndRetryAsync(5, retries => TimeSpan.FromSeconds(retries * 3));
44-
45-
this.Parameters.SetIfNotDefined(nameof(this.Port), 6100);
46-
this.Parameters.SetIfNotDefined(nameof(this.MessagesPerSecond), "max");
47-
this.Parameters.SetIfNotDefined(nameof(this.ConfidenceLevel), 99);
4846
}
4947

5048
/// <summary>

0 commit comments

Comments
 (0)