influxdb/tsdb
Edd Robinson b463f97b15 Batch oriented int encoders
This commit adds a tsm1 function for encoding a batch of ints into a
provided buffer.

The following benchmarks compare the performance of the existing
iterator based encoders, and the new batch oriented encoders. They look
at a sequential input slice, a randomly generated input slice and a
duplicate slice:

name                     old time/op    new time/op    delta
EncodeIntegers/10_seq       144ns ± 2%      41ns ± 1%   -71.46%  (p=0.000 n=10+10)
EncodeIntegers/10_ran       304ns ± 7%     140ns ± 2%   -53.99%  (p=0.000 n=10+10)
EncodeIntegers/10_dup       147ns ± 4%      41ns ± 2%   -72.14%  (p=0.000 n=10+9)
EncodeIntegers/100_seq      483ns ± 7%     208ns ± 1%   -56.98%  (p=0.000 n=10+9)
EncodeIntegers/100_ran     1.64µs ± 7%    1.01µs ± 1%   -38.42%  (p=0.000 n=9+9)
EncodeIntegers/100_dup      484ns ±14%     210ns ± 2%   -56.63%  (p=0.000 n=10+10)
EncodeIntegers/1000_seq    3.11µs ± 2%    1.81µs ± 2%   -41.68%  (p=0.000 n=10+10)
EncodeIntegers/1000_ran    16.9µs ±10%    11.0µs ± 2%   -34.58%  (p=0.000 n=10+10)
EncodeIntegers/1000_dup    3.05µs ± 3%    1.81µs ± 2%   -40.71%  (p=0.000 n=10+8)

name                     old alloc/op   new alloc/op   delta
EncodeIntegers/10_seq       32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/10_ran       32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/10_dup       32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/100_seq      32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/100_ran       128B ± 0%        0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/100_dup      32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/1000_seq     32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/1000_ran    1.15kB ± 0%    0.00kB       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/1000_dup     32.0B ± 0%      0.0B       -100.00%  (p=0.000 n=10+10)

name                     old allocs/op  new allocs/op  delta
EncodeIntegers/10_seq        1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/10_ran        1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/10_dup        1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/100_seq       1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/100_ran       1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/100_dup       1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/1000_seq      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/1000_ran      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
EncodeIntegers/1000_dup      1.00 ± 0%      0.00       -100.00%  (p=0.000 n=10+10)
2018-11-01 18:59:19 +00:00
..
cursors chore: refactor reads service and make it consumable externally 2018-10-09 09:51:13 -06:00
defaults chore(fmt): update formating with make fmt 2018-10-30 07:40:28 -05:00
internal regenerate internal protobuf with non-conflicting package 2018-10-01 12:03:19 +01:00
testdata Update tsdb package from OSS 2018-10-01 12:08:37 +01:00
tsi1 review feedback 2018-10-31 15:41:39 -06:00
tsm1 Batch oriented int encoders 2018-11-01 18:59:19 +00:00
config.go move SeriesFileDirectory constant to defaults package 2018-10-27 02:08:31 +08:00
cursor.go chore: refactor reads service and make it consumable externally 2018-10-09 09:51:13 -06:00
engine.go tsdb: remove hll sketches 2018-10-31 15:41:39 -06:00
errors.go Integrate WAL into engine 2018-10-05 12:44:27 +01:00
explode.go feature(tsdb): decode name back into IDs 2018-10-11 09:54:19 -05:00
explode_test.go feature(tsdb): decode name back into IDs 2018-10-11 09:54:19 -05:00
index.go remove unused seriesPointIterator 2018-10-27 02:08:31 +08:00
index_test.go move SeriesFileDirectory constant to defaults package 2018-10-27 02:08:31 +08:00
meta.go refactor: modify tooling to take advantage of go run 2018-10-15 11:01:27 -05:00
meta_test.go Remove the fields index 2018-10-15 10:22:07 -06:00
series_collection.go Update tsdb package from OSS 2018-10-01 12:08:37 +01:00
series_collection_test.go Update tsdb package from OSS 2018-10-01 12:08:37 +01:00
series_file.go Add tsi1 measurement cardinality stats. 2018-10-17 08:38:41 -06:00
series_file_test.go refactor: move the logger package from influxdb to platform 2018-10-10 15:49:07 -05:00
series_id.go Initial import of models package 2018-10-01 12:03:19 +01:00
series_id_test.go Update tsdb package from OSS 2018-10-01 12:08:37 +01:00
series_index.go fix(tsdb): Fix series file tombstoning. 2018-10-08 14:16:11 -06:00
series_index_test.go Update tsdb package from OSS 2018-10-01 12:08:37 +01:00
series_partition.go chore: add String method to FieldType 2018-10-26 08:24:18 -07:00
series_segment.go Get TSI tests passing 2018-10-01 12:08:37 +01:00
series_segment_test.go Remove the fields index 2018-10-15 10:22:07 -06:00
series_set.go Update roaring dependency 2018-10-01 12:08:37 +01:00
series_set_test.go Update tsdb package from OSS 2018-10-01 12:08:37 +01:00