On 12.07.21 07:49, stav alfi wrote:
> 
> 1. can histogram_quantile return a value which is different than all the 
> bucket values? for example, if the buckets are: 1,2,3. can it return 1.7? 

Yes, it can. See the documentation at
https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile
:

"The histogram_quantile() function interpolates quantile values by
assuming a linear distribution within a bucket."

So if the bucket `le="2"` contains 10 samples, and the seventh
happened to coincide with the median (ar whatever you are
calculating), histogram_quantile will return 1.7.

> 2. in the folllowing screenshot (green=first query - call duration, 
> yellow=second query - quantile), I'm seeing that the 99% quantile took more 
> than the actual API call at the same time (look at 11:46 - yellow 
> (quantile) > green (call duration)). *how can it be?*

Your 1st "green" query calculates _average_ duration (mean value of
all observed call durations). Your 2nd "yellow" query calculates the
99th percentile duration (99% of the observed calls had a duration
shorter than that). It's not surprising that the average is lower than
the 99th percentile.

-- 
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/20210714172821.GE3656%40jahnn.

Reply via email to