Skip to content

Commit

Permalink
Slight correction to formatting of replay percent
Browse files Browse the repository at this point in the history
  • Loading branch information
spaghettidba committed Apr 24, 2020
1 parent a3d20f5 commit 8972cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions WorkloadTools/Consumer/Replay/ReplayConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class ReplayConsumer : BufferedWorkloadConsumer
// holds the total number of events to replay
// only available when reading from a file
// for realtime replays this is not available
private long totalEventCount;
private long totalEventCount = 0;

public enum SynchronizationModeEnum
{
Expand Down Expand Up @@ -82,7 +82,7 @@ public override void ConsumeBuffered(WorkloadEvent evnt)
eventCount++;
if ((eventCount > 0) && (eventCount % WorkerStatsCommandCount == 0))
{
string percentInfo = "( " + ((totalEventCount > 0) ? ((eventCount * 100) / totalEventCount).ToString() : "") + "% )";
string percentInfo = (totalEventCount > 0) ? "( " + ((eventCount * 100) / totalEventCount).ToString() + "% )" : "";
logger.Info($"{eventCount} events queued for replay {percentInfo}");
}

Expand Down

0 comments on commit 8972cc1

Please sign in to comment.