prometheus/rules
Julius Volz 86fc13a52e Convert metric.Values to slice of values.
The initial impetus for this was that it made unmarshalling sample
values much faster.

Other relevant benchmark changes in ns/op:

Benchmark                                 old        new   speedup
==================================================================
BenchmarkMarshal                       179170     127996     1.4x
BenchmarkUnmarshal                     404984     132186     3.1x

BenchmarkMemoryGetValueAtTime           57801      50050     1.2x
BenchmarkMemoryGetBoundaryValues        64496      53194     1.2x
BenchmarkMemoryGetRangeValues           66585      54065     1.2x

BenchmarkStreamAdd                       45.0       75.3     0.6x
BenchmarkAppendSample1                   1157       1587     0.7x
BenchmarkAppendSample10                  4090       4284     0.95x
BenchmarkAppendSample100                45660      44066     1.0x
BenchmarkAppendSample1000              579084     582380     1.0x
BenchmarkMemoryAppendRepeatingValues 22796594   22005502     1.0x

Overall, this gives us good speedups in the areas where they matter
most: decoding values from disk and accessing the memory storage (which
is also used for views).

Some of the smaller append examples take minimally longer, but the cost
seems to get amortized over larger appends, so I'm not worried about
these. Also, we're currently not bottlenecked on the write path and have
plenty of other optimizations available in that area if it becomes
necessary.

Memory allocations during appends don't change measurably at all.

Change-Id: I7dc7394edea09506976765551f35b138518db9e8
2014-03-11 18:23:37 +01:00
..
ast Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
fixtures Add alertmanager notification support to Prometheus. 2013-07-30 17:23:41 +02:00
Makefile Swap rules lexer for much faster one. 2013-07-11 19:35:29 +02:00
alerting.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
helpers.go Rename {Scalar,Vector}Literal to {Scalar,Vector}Selector. 2014-02-22 22:33:42 +01:00
helpers_test.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
lexer.l Don't keep extra labels in aggregations by default. 2013-12-16 12:53:10 +01:00
lexer.l.go Don't keep extra labels in aggregations by default. 2013-12-16 12:53:10 +01:00
load.go Use github.com/golang/glog for all logging. 2013-08-12 17:54:36 +02:00
manager.go Merge "Display filename when encountering bad rule file." 2013-12-13 15:01:02 +01:00
parser.y Rename {Scalar,Vector}Literal to {Scalar,Vector}Selector. 2014-02-22 22:33:42 +01:00
parser.y.go Rename {Scalar,Vector}Literal to {Scalar,Vector}Selector. 2014-02-22 22:33:42 +01:00
recording.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
rules.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
rules_test.go Add count_scalar() function. 2014-01-30 13:07:26 +01:00
telemetry.go add evalDuration histogram and ruleCount counter for rules 2013-12-11 15:42:53 -05:00