/** * Force a reset so that percentiles start being gathered from scratch. */ public void Reset() { /* no-op if disabled */ if (!configurationService.GetMetricsRollingPercentileEnabled()) { return; } // clear buckets so we start over again buckets.Clear(); }
public void Reset() { // if we are resetting, that means the lastBucket won't have a chance to be captured in CumulativeSum, so let's do it here RollingNumberBucket lastBucket = buckets.GetTail(); if (lastBucket != null) { cumulativeSum.AddBucket(lastBucket); } // clear buckets so we start over again buckets.Clear(); }