Esempio n. 1
0
 /// <inheritdoc />
 public virtual void Reset()
 {
     _uncounted.Reset();
     _total.SetValue(0L);
     _m1Rate.SetValue(0.0);
     _m5Rate.SetValue(0.0);
     _m15Rate.SetValue(0.0);
 }
Esempio n. 2
0
 protected internal override void clearCounts()
 {
     try
     {
         _wrp.ReaderLock();
         Debug.Assert(countsArrayLength == _activeCounts.Length);
         Debug.Assert(countsArrayLength == _inactiveCounts.Length);
         for (var i = 0; i < _activeCounts.Length; i++)
         {
             _activeCounts.SetValue(i, 0);
             _inactiveCounts.SetValue(i, 0);
         }
         TotalCount.Reset();
     }
     finally
     {
         _wrp.ReaderUnlock();
     }
 }
Esempio n. 3
0
 public void Reset()
 {
     _numMsgsSent.Reset();
     _numBytesSent.Reset();
     _numSendFailed.Reset();
     _numAcksReceived.Reset();
     _totalMsgsSent.Reset();
     _totalBytesSent.Reset();
     _totalSendFailed.Reset();
     _totalAcksReceived.Reset();
 }
Esempio n. 4
0
        /// <inheritdoc />
        public void Reset()
        {
            _counter.Reset();

            if (_setCounters != null)
            {
                foreach (var item in _setCounters)
                {
                    item.Value.Reset();
                }
            }
        }
Esempio n. 5
0
 public void Reset()
 {
     _numMsgsReceived.Reset();
     _numBytesReceived.Reset();
     _numReceiveFailed.Reset();
     _numBatchReceiveFailed.Reset();
     _numAcksSent.Reset();
     _numAcksFailed.Reset();
     _totalMsgsReceived.Reset();
     _totalBytesReceived.Reset();
     _totalReceiveFailed.Reset();
     _totalBatchReceiveFailed.Reset();
     _totalAcksSent.Reset();
     _totalAcksFailed.Reset();
 }
        public void Can_reset()
        {
            Parallel.For(
                1,
                1000,
                l =>
            {
                _num.Add(l);

                if (l % 2 == 0)
                {
                    _num.Reset();
                }
            });

            _num.GetValue().Should().BeLessThan(499500);
        }
Esempio n. 7
0
 protected internal override void clearCounts()
 {
     try
     {
         wrp.ReaderLock();
         Debug.Assert(countsArrayLength == activeCounts.Length);
         Debug.Assert(countsArrayLength == inactiveCounts.Length);
         for (int i = 0; i < activeCounts.Length; i++)
         {
             activeCounts.SetValue(i, 0);
             inactiveCounts.SetValue(i, 0);
         }
         totalCount.Reset();
     }
     finally
     {
         wrp.ReaderUnlock();
     }
 }