【发布时间】:2016-04-16 07:44:44
【问题描述】:
我正在使用 HdrHistogram java 库,但没有得到所需的输出。你能帮我理解库或预期值有错误吗?
在这种情况下,我期望输出为 1000000,但实际输出为 1000003
import org.HdrHistogram.*;
public class Main {
public static void main(String[] args) throws InterruptedException {
Histogram histogram = new Histogram(5);
histogram.recordValue(1000000);
histogram.recordValue(1000001);
histogram.recordValue(1000002);
histogram.recordValue(90);
histogram.recordValue(10);
System.err.println(histogram.getValueAtPercentile(50.0));
}
}
为什么会这样。 我的 Maven 设置是:-
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
<version>2.1.8</version>
</dependency>
【问题讨论】:
标签: java histogram hdr date-histogram hdrhistogram