public void TestReestablishTotalCount() { var histogram = new ShortHistogram(HighestTrackableValue, 2); histogram.RecordValue(TestValueLevel); histogram.RecordValue(TestValueLevel * 10); Assert.False(histogram.HasOverflowed()); // This should overflow a ShortHistogram: histogram.RecordValueWithExpectedInterval(histogram.HighestTrackableValue - 1, 500); Assert.True(histogram.HasOverflowed()); histogram.ReestablishTotalCount(); Assert.False(histogram.HasOverflowed()); }
public void TestReestablishTotalCount() { var histogram = new ShortHistogram(HighestTrackableValue, 2); histogram.RecordValue(TestValueLevel); histogram.RecordValue(TestValueLevel * 10); Assert.False(histogram.HasOverflowed()); // This should overflow a ShortHistogram: histogram.RecordValueWithExpectedInterval(histogram.HighestTrackableValue - 1, 500); Assert.True(histogram.HasOverflowed()); histogram.ReestablishTotalCount(); Assert.False(histogram.HasOverflowed()); }