/// <summary>
        /// method is virtual so subclasses can add their own events
        /// </summary>
        public virtual void EnableStatsCollection()
        {
            stats = new LogConsistencyStatistics()
            {
                EventCounters = new Dictionary <string, long>(),
                StabilizationLatenciesInMsecs = new List <int>()
            };

            stats.EventCounters.Add("TentativeViewCalled", 0);
            stats.EventCounters.Add("ConfirmedViewCalled", 0);
            stats.EventCounters.Add("ConfirmedVersionCalled", 0);
            stats.EventCounters.Add("SubmitCalled", 0);
            stats.EventCounters.Add("SubmitRangeCalled", 0);
            stats.EventCounters.Add("TryAppendCalled", 0);
            stats.EventCounters.Add("TryAppendRangeCalled", 0);
            stats.EventCounters.Add("ConfirmSubmittedEntriesCalled", 0);
            stats.EventCounters.Add("SynchronizeNowCalled", 0);

            stats.EventCounters.Add("WritebackEvents", 0);

            stats.StabilizationLatenciesInMsecs = new List <int>();
        }
 /// <summary>
 /// Disable stats collection
 /// </summary>
 public void DisableStatsCollection()
 {
     stats = null;
 }