mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
address comment
Signed-off-by: jyz0309 <45495947@qq.com>
This commit is contained in:
parent
02e032884a
commit
e40deb1086
@ -241,7 +241,7 @@ vector. `by` and `without` are only used to bucket the input vector.
|
||||
`quantile` calculates the φ-quantile, the value that ranks at number φ*N among
|
||||
the N metric values of the dimensions aggregated over. φ is provided as the
|
||||
aggregation parameter. For example, `quantile(0.5, ...)` calculates the median,
|
||||
`quantile(0.95, ...)` the 95th percentile. For φ = `NaN`, `NaN` is returned.
|
||||
`quantile(0.95, ...)` the 95th percentile. For φ = `NaN`, `NaN` is returned. For φ < 0, `-Inf` is returned. For φ > 1, `+Inf` is returned.
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -186,7 +186,7 @@ func ensureMonotonic(buckets buckets) {
|
||||
// quantile calculates the given quantile of a vector of samples.
|
||||
//
|
||||
// The Vector will be sorted.
|
||||
// If 'values' has zero elements
|
||||
// If 'values' has zero elements, NaN is returned.
|
||||
// If q==NaN, NaN is returned.
|
||||
// If q<0, -Inf is returned.
|
||||
// If q>1, +Inf is returned.
|
||||
|
5
promql/testdata/aggregators.test
vendored
5
promql/testdata/aggregators.test
vendored
@ -399,6 +399,11 @@ eval instant at 1m quantile without(point)((scalar(foo)), data)
|
||||
{test="three samples"} 1.6
|
||||
{test="uneven samples"} 2.8
|
||||
|
||||
eval instant at 1m quantile without(point)(NaN, data)
|
||||
{test="two samples"} NaN
|
||||
{test="three samples"} NaN
|
||||
{test="uneven samples"} NaN
|
||||
|
||||
# Tests for group.
|
||||
clear
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user