I am using HdrHistogram java library but I am not getting the desired output. Can you please help me understand there is an error in the library or expected value.
In this case I am expecting the output to be 1000000, but actual output is 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));
}
}
Why is this happening. My maven settings are:-
<dependency>
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
<version>2.1.8</version>
</dependency>