From 8972cc1e20fe72ef99a16aea71ad024a9a1d3243 Mon Sep 17 00:00:00 2001 From: Gianluca Sartori Date: Fri, 24 Apr 2020 11:39:22 +0200 Subject: [PATCH] Slight correction to formatting of replay percent --- WorkloadTools/Consumer/Replay/ReplayConsumer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WorkloadTools/Consumer/Replay/ReplayConsumer.cs b/WorkloadTools/Consumer/Replay/ReplayConsumer.cs index a58937a..8c6ff23 100644 --- a/WorkloadTools/Consumer/Replay/ReplayConsumer.cs +++ b/WorkloadTools/Consumer/Replay/ReplayConsumer.cs @@ -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 { @@ -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}"); }