mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
Add topk/bottomk tests for multiple buckets.
This commit is contained in:
parent
3b0c182eee
commit
fa9cc15573
14
promql/testdata/aggregators.test
vendored
14
promql/testdata/aggregators.test
vendored
|
@ -159,6 +159,20 @@ eval_ordered instant at 50m bottomk(5, http_requests{group="canary",job="app-ser
|
|||
http_requests{group="canary", instance="0", job="app-server"} 700
|
||||
http_requests{group="canary", instance="1", job="app-server"} 800
|
||||
|
||||
eval instant at 50m topk by (group) (1, http_requests)
|
||||
http_requests{group="production", instance="1", job="app-server"} 600
|
||||
http_requests{group="canary", instance="1", job="app-server"} 800
|
||||
|
||||
eval instant at 50m bottomk by (group) (2, http_requests)
|
||||
http_requests{group="canary", instance="0", job="api-server"} 300
|
||||
http_requests{group="canary", instance="1", job="api-server"} 400
|
||||
http_requests{group="production", instance="0", job="api-server"} 100
|
||||
http_requests{group="production", instance="1", job="api-server"} 200
|
||||
|
||||
eval_ordered instant at 50m bottomk by (group) (2, http_requests{group="production"})
|
||||
http_requests{group="production", instance="0", job="api-server"} 100
|
||||
http_requests{group="production", instance="1", job="api-server"} 200
|
||||
|
||||
# Test NaN is sorted away from the top/bottom.
|
||||
eval_ordered instant at 50m topk(3, http_requests{job="api-server",group="production"})
|
||||
http_requests{job="api-server", instance="1", group="production"} 200
|
||||
|
|
Loading…
Reference in a new issue