We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How hard would it be to add a method that queries the histogram for a percentile given a sample?
If i have a measurement of 300ms what percentile does this sample fall under?
The text was updated successfully, but these errors were encountered:
I haven't actually compiled this but here's my 15-minute guess:
public double GetPercentileForValue(long value) { var bucketIndex = GetBucketIndex(value); var subBucketIndex = GetSubBucketIndex(value, bucketIndex); long runningCount = 0; for (var i = 0; i < BucketCount; i++) { var j = (i==0) ? 0 : (SubBucketCount / 2); for (;j < SubBucketCount;j++) { runningCount += GetCountAt(i,j); if (i == bucketIndex && j == subBucketIndex) { return (runningCount / TotalCount) * 100.0; } } } return 100; }
Sorry, something went wrong.
No branches or pull requests
How hard would it be to add a method that queries the histogram for a percentile given a sample?
If i have a measurement of 300ms what percentile does this sample fall under?
The text was updated successfully, but these errors were encountered: