Example #1
0
 private void reset(/*final*/ AbstractHistogram histogram, /*final*/ long valueUnitsPerBucket)
 {
     base.resetIterator(histogram);
     this.valueUnitsPerBucket     = valueUnitsPerBucket;
     this.nextValueReportingLevel = valueUnitsPerBucket;
     this.nextValueReportingLevelLowestEquivalent = histogram.lowestEquivalentValue(this.nextValueReportingLevel);
 }
 public void testScalingEquivalence()
 {
     Assert.assertEquals("averages should be equivalent",
                         histogram.getMean() * 512,
                         scaledHistogram.getMean(), scaledHistogram.getMean() * 0.000001);
     Assert.assertEquals("total count should be the same",
                         histogram.getTotalCount(),
                         scaledHistogram.getTotalCount());
     Assert.assertEquals("99%'iles should be equivalent",
                         histogram.lowestEquivalentValue(histogram.getValueAtPercentile(99.0)) * 512,
                         scaledHistogram.lowestEquivalentValue(scaledHistogram.getValueAtPercentile(99.0)));
     Assert.assertEquals("Max should be equivalent",
                         histogram.getMaxValue() * 512,
                         scaledHistogram.getMaxValue());
     // Same for post-corrected:
     Assert.assertEquals("averages should be equivalent",
                         histogram.getMean() * 512,
                         scaledHistogram.getMean(), scaledHistogram.getMean() * 0.000001);
     Assert.assertEquals("total count should be the same",
                         postCorrectedHistogram.getTotalCount(),
                         postCorrectedScaledHistogram.getTotalCount());
     Assert.assertEquals("99%'iles should be equivalent",
                         postCorrectedHistogram.lowestEquivalentValue(postCorrectedHistogram.getValueAtPercentile(99.0)) * 512,
                         postCorrectedScaledHistogram.lowestEquivalentValue(postCorrectedScaledHistogram.getValueAtPercentile(99.0)));
     Assert.assertEquals("Max should be equivalent",
                         postCorrectedHistogram.getMaxValue() * 512,
                         postCorrectedScaledHistogram.getMaxValue());
 }
Example #3
0
 private void reset(/*final*/ AbstractHistogram histogram, /*final*/ int valueUnitsInFirstBucket, /*final*/ double logBase)
 {
     base.resetIterator(histogram);
     this.logBase = logBase;
     this.valueUnitsInFirstBucket = valueUnitsInFirstBucket;
     this.nextValueReportingLevel = valueUnitsInFirstBucket;
     this.nextValueReportingLevelLowestEquivalent = histogram.lowestEquivalentValue(this.nextValueReportingLevel);
 }
 private void reset(/*final*/ AbstractHistogram histogram, /*final*/ int valueUnitsInFirstBucket, /*final*/ double logBase) 
 {
     base.resetIterator(histogram);
     this.logBase = logBase;
     this.valueUnitsInFirstBucket = valueUnitsInFirstBucket;
     this.nextValueReportingLevel = valueUnitsInFirstBucket;
     this.nextValueReportingLevelLowestEquivalent = histogram.lowestEquivalentValue(this.nextValueReportingLevel);
 }
Example #5
0
 private void reset(/*final*/ AbstractHistogram histogram, /*final*/ long valueUnitsPerBucket) {
     base.resetIterator(histogram);
     this.valueUnitsPerBucket = valueUnitsPerBucket;
     this.nextValueReportingLevel = valueUnitsPerBucket;
     this.nextValueReportingLevelLowestEquivalent = histogram.lowestEquivalentValue(this.nextValueReportingLevel);
 }