mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Clarify sorting behaviour of topk
and bottomk
.
Signed-off-by: Charles Korn <charles.korn@grafana.com>
This commit is contained in:
parent
acd74b02fb
commit
2cfd402b3a
|
@ -321,6 +321,13 @@ vector. `by` and `without` are only used to bucket the input vector. Similar to
|
||||||
to be farthest from the top or bottom, respectively. Histogram samples in the
|
to be farthest from the top or bottom, respectively. Histogram samples in the
|
||||||
input vector are ignored, flagged by an info-level annotation.
|
input vector are ignored, flagged by an info-level annotation.
|
||||||
|
|
||||||
|
If used in an instant query, `topk` and `bottomk` return series ordered by
|
||||||
|
value in descending or ascending order, respectively. If used with `by` or
|
||||||
|
`without`, then series within each bucket are sorted by value, and series in
|
||||||
|
the same bucket are returned consecutively, but there is no guarantee that
|
||||||
|
buckets of series will be returned in any particular order. No sorting applies
|
||||||
|
to range queries.
|
||||||
|
|
||||||
`limitk` and `limit_ratio` also return a subset of the input samples, including
|
`limitk` and `limit_ratio` also return a subset of the input samples, including
|
||||||
the original labels in the result vector. The subset is selected in a
|
the original labels in the result vector. The subset is selected in a
|
||||||
deterministic pseudo-random way. `limitk` picks _k_ samples, while
|
deterministic pseudo-random way. `limitk` picks _k_ samples, while
|
||||||
|
|
Loading…
Reference in a new issue