mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 00:53:12 +00:00
89760dd77d
Similar to topk and sort, prefer not returning NaN where possible.
23 lines
664 B
Plaintext
23 lines
664 B
Plaintext
# Tests for min/max.
|
|
clear
|
|
load 5m
|
|
http_requests{job="api-server", instance="0", group="production"} 1
|
|
http_requests{job="api-server", instance="1", group="production"} 2
|
|
http_requests{job="api-server", instance="0", group="canary"} NaN
|
|
http_requests{job="api-server", instance="1", group="canary"} 3
|
|
http_requests{job="api-server", instance="2", group="canary"} 4
|
|
|
|
eval instant at 0m max(http_requests)
|
|
{} 4
|
|
|
|
eval instant at 0m min(http_requests)
|
|
{} 1
|
|
|
|
eval instant at 0m max by (group) (http_requests)
|
|
{group="production"} 2
|
|
{group="canary"} 4
|
|
|
|
eval instant at 0m min by (group) (http_requests)
|
|
{group="production"} 1
|
|
{group="canary"} 3
|