I'm trying to figure out the calculation behind
histogram_quantile(0.9, rate(http_request_duration_seconds_bucket[10m]))
Based on https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile, the above expression calculates the 90th percentile of request durations over the last 10m.
As I understand, http_request_duration_seconds_bucket
is an array of buckets with le
and counts. le
specifies the bucket boundaries.
What's the calculation behind rate(http_request_duration_seconds_bucket[10m])
then, does it calculate the increase of counts in each bucket per second?
Based on the expression, above, histogram_quantile(0.9, rate(...))
, the rate(...)
part is like a cumulative density distribution (CDF).
Do I understand correctly?