public void Mark(long n) { _count.AddAndGet(n); _m1Rate.Update(n); _m5Rate.Update(n); _m15Rate.Update(n); }
/// <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); }
/// <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); }
/// <summary> /// Update the moving average with a new value. /// </summary> /// <param name="n"></param> public void Update(long n) { _uncounted.AddAndGet(n); }