public void CanCreateShortHistogram() { var actual = HistogramFactory.With16BitBucketSize() .Create(); Assert.IsAssignableFrom <ShortHistogram>(actual); }
public void CanCreateShortHistogram() { var actual = HistogramFactory.With16BitBucketSize() .Create(); Assert.IsInstanceOf <ShortHistogram>(actual); }
internal override HistogramBase Create(long highestTrackableValue, int numberOfSignificantValueDigits) { //return new ShortHistogram(highestTrackableValue, numberOfSignificantValueDigits); return(HistogramFactory.With16BitBucketSize() .WithValuesUpTo(highestTrackableValue) .WithPrecisionOf(numberOfSignificantValueDigits) .Create()); }
protected override HistogramBase CreateHistogram(long id, long min, long max, int sf) { //return new ShortHistogram(id, min, max, sf); return(HistogramFactory.With16BitBucketSize() .WithValuesFrom(min) .WithValuesUpTo(max) .WithPrecisionOf(sf) .Create()); }
protected override Recorder Create(long min, long max, int sf) { return(HistogramFactory.With16BitBucketSize() .WithValuesFrom(min) .WithValuesUpTo(max) .WithPrecisionOf(sf) .WithThreadSafeReads() .Create()); }
public void CanCreateShortHistogramWithSpecifiedRangeValues(long min, long max, int sf) { var actual = HistogramFactory.With16BitBucketSize() .WithValuesFrom(min) .WithValuesUpTo(max) .WithPrecisionOf(sf) .Create(); Assert.IsAssignableFrom <ShortHistogram>(actual); Assert.Equal(min, actual.LowestTrackableValue); Assert.Equal(max, actual.HighestTrackableValue); Assert.Equal(sf, actual.NumberOfSignificantValueDigits); }
public void CanCreateShortHistogramRecorder(long min, long max, int sf) { var actual = HistogramFactory.With16BitBucketSize() .WithValuesFrom(min) .WithValuesUpTo(max) .WithPrecisionOf(sf) .WithThreadSafeReads() .Create(); var histogram = actual.GetIntervalHistogram(); Assert.IsAssignableFrom <ShortHistogram>(histogram); Assert.Equal(min, histogram.LowestTrackableValue); Assert.Equal(max, histogram.HighestTrackableValue); Assert.Equal(sf, histogram.NumberOfSignificantValueDigits); }