Skip to content

Commit 0acd25d

Browse files
committed
Rename Kill methods to SafeKill to preserve previous naming conventions.
1 parent 75fc2d5 commit 0acd25d

67 files changed

Lines changed: 204 additions & 197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.21
1+
2.1.22

src/VirtualClient/VirtualClient.Actions/3DMark/ThreeDMarkExecutor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private Task ExecuteWorkloadAsync(EventContext telemetryContext, CancellationTok
175175
// Point 3DMark to DLC Path
176176
using (IProcessProxy process = this.systemManagement.ProcessManager.CreateProcess(psexec, $"{baseArg} {this.ExecutablePath} --path={this.DLCPath}", this.psexecDir))
177177
{
178-
this.CleanupTasks.Add(() => process.SafeKill());
178+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
179179

180180
try
181181
{
@@ -201,7 +201,7 @@ private Task ExecuteWorkloadAsync(EventContext telemetryContext, CancellationTok
201201
// Lisence Registry
202202
using (IProcessProxy process = this.systemManagement.ProcessManager.CreateProcess(psexec, $"{baseArg} {this.ExecutablePath} --register={this.LisenceKey}", this.psexecDir))
203203
{
204-
this.CleanupTasks.Add(() => process.SafeKill());
204+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
205205

206206
try
207207
{
@@ -238,7 +238,7 @@ private Task ExecuteWorkloadAsync(EventContext telemetryContext, CancellationTok
238238

239239
using (IProcessProxy process = this.systemManagement.ProcessManager.CreateProcess(psexec, commandArguments, this.psexecDir))
240240
{
241-
this.CleanupTasks.Add(() => process.SafeKill());
241+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
242242

243243
try
244244
{
@@ -264,7 +264,7 @@ private Task ExecuteWorkloadAsync(EventContext telemetryContext, CancellationTok
264264
string commandArguments2 = $"{baseArg} {this.ExecutablePath} --in={this.OutFileName} --export=result.xml";
265265
using (IProcessProxy process = this.systemManagement.ProcessManager.CreateProcess(psexec, commandArguments2, this.psexecDir))
266266
{
267-
this.CleanupTasks.Add(() => process.SafeKill());
267+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
268268

269269
try
270270
{

src/VirtualClient/VirtualClient.Actions/7zip/Compression7zipExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ await this.Logger.LogMessageAsync($"{nameof(Compression7zipExecutor)}.ExecutePro
170170
DateTime start = DateTime.Now;
171171
using (IProcessProxy process = this.systemManager.ProcessManager.CreateElevatedProcess(this.Platform, pathToExe, commandLineArguments, workingDirectory))
172172
{
173-
this.CleanupTasks.Add(() => process.SafeKill());
173+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
174174
await process.StartAndWaitAsync(cancellationToken)
175175
.ConfigureAwait(false);
176176

src/VirtualClient/VirtualClient.Actions/ASPNET/AspNetBenchExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ private async Task ExecuteCommandAsync(string pathToExe, string commandLineArgum
227227
{
228228
if (isServer)
229229
{
230-
this.killServer = () => process.SafeKill();
230+
this.killServer = () => process.SafeKill(this.Logger);
231231
}
232232

233-
this.CleanupTasks.Add(() => process.SafeKill());
233+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
234234
await process.StartAndWaitAsync(cancellationToken).ConfigureAwait(false);
235235

236236
if (!cancellationToken.IsCancellationRequested)

src/VirtualClient/VirtualClient.Actions/CtsTraffic/CtsTrafficServerExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ await this.Logger.LogMessageAsync($"{this.TypeName}.ExecuteWorkload", relatedCon
134134

135135
process = processManager.CreateProcess(command, commandArguments, workingDirectory);
136136

137-
this.CleanupTasks.Add(() => process.SafeKill());
137+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
138138
this.Logger.LogTraceMessage($"Executing: {command} {commandArguments}".Trim(), relatedContext);
139139

140140
if (!process.Start())

src/VirtualClient/VirtualClient.Actions/DCGMI/DCGMIExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ await this.Logger.LogMessageAsync($"{typeof(TExecutor).Name}.ExecuteProcess", te
267267
{
268268
using (IProcessProxy process = this.systemManagement.ProcessManager.CreateElevatedProcess(this.Platform, command, null, workingDirectory))
269269
{
270-
this.CleanupTasks.Add(() => process.SafeKill());
270+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
271271
process.RedirectStandardOutput = true;
272272
await process.StartAndWaitAsync(cancellationToken).ConfigureAwait(false);
273273

src/VirtualClient/VirtualClient.Actions/DXMicrobenchmarks/DXFLOPSExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ private Task ExecuteWorkloadAsync(EventContext telemetryContext, CancellationTok
144144
string cmdargs = $"--num_loops 1 --num_loops_in_shader {this.ShaderIterations} --thread_num_per_block {this.ThreadsPerBlock} --num_data_elements {this.NumDataElements} {(this.Precision == "f16" ? "--f16 1" : "--f32 1")}";
145145
using (IProcessProxy process = this.systemManagement.ProcessManager.CreateProcess(this.ExecutablePath, cmdargs))
146146
{
147-
this.CleanupTasks.Add(() => process.SafeKill());
147+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
148148
process.RedirectStandardOutput = true;
149149
try
150150
{

src/VirtualClient/VirtualClient.Actions/DeathStarBench/DeathStarBenchExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ await this.Logger.LogMessageAsync($"{this.TypeName}.ExecuteProcess", telemetryCo
415415
{
416416
using (IProcessProxy process = this.SystemManager.ProcessManager.CreateElevatedProcess(this.Platform, command, null, workingDirectory))
417417
{
418-
this.CleanupTasks.Add(() => process.SafeKill());
418+
this.CleanupTasks.Add(() => process.SafeKill(this.Logger));
419419
await process.StartAndWaitAsync(cancellationToken)
420420
.ConfigureAwait();
421421

src/VirtualClient/VirtualClient.Actions/Examples/ClientServer/ExampleClientExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private Task ExecuteWorkloadAsync(IPAddress serverIpAddress, EventContext teleme
261261
// We create a operating system process to host the executing workload, start it and wait for it to exit.
262262
using (IProcessProxy workloadProcess = this.ProcessManager.CreateProcess(this.WorkloadExecutablePath, commandArguments, this.WorkloadPackage.Path))
263263
{
264-
this.CleanupTasks.Add(() => workloadProcess.SafeKill());
264+
this.CleanupTasks.Add(() => workloadProcess.SafeKill(this.Logger));
265265

266266
await workloadProcess.StartAndWaitAsync(cancellationToken)
267267
.ConfigureAwait(false);

src/VirtualClient/VirtualClient.Actions/Examples/ClientServer/ExampleReverseProxyExecutor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ private async Task StartWebServerAsync(IEnumerable<IPAddress> serverIpAddresses,
198198
throw new WorkloadException($"The API reverse proxy workload did not start as expected.", ErrorReason.WorkloadFailed);
199199
}
200200

201-
this.CleanupTasks.Add(() => webHostProcess.SafeKill());
201+
this.CleanupTasks.Add(() => webHostProcess.SafeKill(this.Logger));
202202

203203
// Notify clients that the reverse proxy server is online.
204204
Item<State> serverOnline = new Item<State>(ExampleClientServerExecutor.ServerReadyState, new State());

0 commit comments

Comments
 (0)