예제 #1
0
 public void Mark(long n)
 {
     _count.AddAndGet(n);
     _m1Rate.Update(n);
     _m5Rate.Update(n);
     _m15Rate.Update(n);
 }
예제 #2
0
 /// <summary>
 /// Mark the occurrence of a given number of events
 /// </summary>
 /// <param name="n">the number of events</param>
 public void Mark(long n)
 {
     tickIfNecessary();
     _count.AddAndGet(n);
     _m1Rate.Update(n);
     _m5Rate.Update(n);
     _m15Rate.Update(n);
 }
예제 #3
0
 /// <summary>
 /// Increment the counter by amount
 /// </summary>
 /// <param name="amount">the amount by which the counter will be increased</param>
 public void Increment(long amount)
 {
     _count.AddAndGet(amount);
 }
예제 #4
0
 /// <summary>
 ///  Update the moving average with a new value.
 /// </summary>
 /// <param name="n"></param>
 public void Update(long n)
 {
     _uncounted.AddAndGet(n);
 }