topk

Warning

This operation is still incubating and may change.

Input Stack:
k: Int
stat: String
TimeSeriesExpr
Output Stack:
TimeSeriesExpr
 
 

Since: 1.7

Restrict the output for a grouped expression to the k time series with the largest value for the specified summary statistic. Example of usage:

BeforeAfter
name,sps,:eq,
(,nf.cluster,),:by
name,sps,:eq,
(,nf.cluster,),:by,
max,2,:topk

In some cases it can be useful to see an aggregate summary of the other time series that were not part of the top set. This can be accomplished using the :topk-others-$(aggr) operators. Permitted aggregations are avg, max, min, and sum. For more details see: