prometheus/storage/metric
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
..
.gitignore Spin up curator run in the tests. 2013-04-05 13:55:11 +02:00
compaction_regression_test.go Major code cleanup in storage. 2014-02-27 15:22:37 +01:00
curator.go Major code cleanup in storage. 2014-02-27 15:22:37 +01:00
dto.go WIP - Snapshot of Moving to Client Model. 2013-06-25 15:52:42 +02:00
end_to_end_test.go Remove unused labelname -> fingerprints index. 2014-03-05 23:49:33 +01:00
freelist.go Fixups for single-op-per-fingerprint view rendering. 2014-03-07 00:54:28 +01:00
helpers_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
index.go Remove unused labelname -> fingerprints index. 2014-03-05 23:49:33 +01:00
instrumentation.go Remove unused labelname -> fingerprints index. 2014-03-05 23:49:33 +01:00
interface.go Remove unused labelname -> fingerprints index. 2014-03-05 23:49:33 +01:00
interface_test.go Use LRU cache to avoid querying stale series. 2013-06-06 23:56:19 +02:00
labelpair.go Major code cleanup in storage. 2014-02-27 15:22:37 +01:00
labelpair_test.go WIP - Snapshot of Moving to Client Model. 2013-06-25 15:52:42 +02:00
leveldb.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
memory.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
memory_test.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
objective.go Update low-level i'faces to reflect wireformats. 2013-09-04 17:13:58 +02:00
operation.go Remove the multi-op-per-fingerprint capability. 2014-03-04 16:29:56 +01:00
operation_test.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
processor.go Store samples in custom binary encoding. 2014-03-09 22:31:38 +01:00
processor_test.go Store samples in custom binary encoding. 2014-03-09 22:31:38 +01:00
regressions_test.go Use custom timestamp type for sample timestamps and related code. 2013-12-03 09:11:28 +01:00
rule_integration_test.go Major code cleanup in storage. 2014-02-27 15:22:37 +01:00
sample.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
sample_test.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
samplekey.go Major code cleanup in storage. 2014-02-27 15:22:37 +01:00
stochastic_test.go Store samples in custom binary encoding. 2014-03-09 22:31:38 +01:00
tiered.go Store samples in custom binary encoding. 2014-03-09 22:31:38 +01:00
tiered_test.go Convert metric.Values to slice of values. 2014-03-11 18:23:37 +01:00
view.go Remove the multi-op-per-fingerprint capability. 2014-03-04 16:29:56 +01:00
view_test.go Remove the multi-op-per-fingerprint capability. 2014-03-04 16:29:56 +01:00
watermark.go Unify LevelDB.*Options. 2014-02-27 16:03:58 +01:00