/// <summary>Takes current snapshot.</summary>
        /// <remarks>Not thread-safe. Caller should ensure that it's not called from different threads at once.</remarks>
        public ConsensusManagerPerformanceSnapshot TakeSnapshot()
        {
            var newSnapshot      = new ConsensusManagerPerformanceSnapshot();
            var previousSnapshot = this.currentSnapshot;

            this.currentSnapshot = newSnapshot;

            return(previousSnapshot);
        }
 public ConsensusManagerPerformanceCounter()
 {
     this.currentSnapshot = new ConsensusManagerPerformanceSnapshot();
 }