prometheus/rules
Julius Volz 200d02effe Implement topk() and bottomk() functions.
To achieve O(log n * k) runtime, this uses a heap to track the current
bottom-k or top-k elements while iterating over the full set of
available elements.

It would be possible to reuse more code between topk and bottomk, but I
decided for some more duplication for the sake of clarity.

This fixes https://github.com/prometheus/prometheus/issues/399

Change-Id: I7487ddaadbe7acb22ca2cf2283ba6e7915f2b336
2014-08-05 19:05:36 +02:00
..
ast Implement topk() and bottomk() functions. 2014-08-05 19:05:36 +02:00
fixtures Add alertmanager notification support to Prometheus. 2013-07-30 17:23:41 +02:00
manager Make metrics exported by the Prometheus server itself more consistent. 2014-07-31 15:44:31 +02:00
alerting.go Let consoles get graph links from experssions. 2014-07-25 13:31:47 +01:00
helpers.go Let consoles get graph links from experssions. 2014-07-25 13:31:47 +01:00
helpers_test.go Separate storage implementation from interfaces. 2014-04-16 13:30:19 +02:00
lexer.l Add regex-matching support for labels. 2014-04-01 14:24:53 +02:00
lexer.l.go Add regex-matching support for labels. 2014-04-01 14:24:53 +02:00
load.go Use github.com/golang/glog for all logging. 2013-08-12 17:54:36 +02:00
Makefile Swap rules lexer for much faster one. 2013-07-11 19:35:29 +02:00
parser.y Add regex-matching support for labels. 2014-04-01 14:24:53 +02:00
parser.y.go Add regex-matching support for labels. 2014-04-01 14:24:53 +02:00
recording.go Let consoles get graph links from experssions. 2014-07-25 13:31:47 +01:00
rules.go Separate storage implementation from interfaces. 2014-04-16 13:30:19 +02:00
rules_test.go Implement topk() and bottomk() functions. 2014-08-05 19:05:36 +02:00