Skip to content
New issue

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

Feature(new_metrics): implement the percentile #991

Closed
Tracked by #922
empiredan opened this issue Jun 1, 2022 · 0 comments
Closed
Tracked by #922

Feature(new_metrics): implement the percentile #991

empiredan opened this issue Jun 1, 2022 · 0 comments

Comments

@empiredan
Copy link
Contributor

The percentile is a metric type that samples observations as is described in #922. The size of samples has an upper bound. Once the maximum size is reached, the earliest observations will be overwritten.

On the other hand, kth percentiles, such as P50, P90, P95, P99, P999, will be calculated periodically over all samples. The kth percentiles which are calculated are configurable provided that they are of valid kth_percentile_type (i.e. in kAllKthPercentileTypes).

The most common usage of percentile is latency, such as server-level and replica-level latencies. For example, if P99 latency is 10 ms, it means the latencies of 99% requests are less than 10 ms.

The percentile is implemented by the finder for nth elements. Each kth percentile is firstly converted to nth index; then, find the element corresponding to the nth index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant