public void TestOverflow() { 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()); Console.WriteLine("Histogram percentile output should show overflow:"); histogram.OutputPercentileDistribution(Console.Out, 5, 100.0); Console.WriteLine("\nHistogram percentile output should be in CSV format and show overflow:"); histogram.OutputPercentileDistribution(Console.Out, 5, 100.0, true); Console.WriteLine(""); }