Skip to content

Commit

Permalink
Revert "Prevent divide-by-zero for incomplete threads"
Browse files Browse the repository at this point in the history
This reverts commit 9740d85d96a86414a0020338811f8d5f7049a7c5.
  • Loading branch information
mikeharder committed Feb 9, 2021
1 parent 9ef460b commit 39c9893
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions common/Perf/Azure.Test.Perf/PerfProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,7 @@ private static async Task RunTestsAsync(IPerfTest[] tests, PerfOptions options,
var latency = warmup ? false : options.Latency;

_completedOperations = new int[options.Parallel];

// Initialize _lastCompletionTimes with non-zero values to avoid divide-by-zero for threads
// with no completed operations.
_lastCompletionTimes = Enumerable.Repeat(TimeSpan.MinValue, options.Parallel).ToArray();
_lastCompletionTimes = new TimeSpan[options.Parallel];

if (latency)
{
Expand Down

0 comments on commit 39c9893

Please sign in to comment.