influxdb/tsdb/tsm1
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
..
DESIGN.md Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
array_cursor.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
array_cursor.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
array_cursor_iterator.gen.go chore(fmt): fix and simplify go formatting 2018-10-08 17:23:54 -05:00
array_cursor_iterator.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
array_cursor_iterator.go chore: refactor reads service and make it consumable externally 2018-10-09 09:51:13 -06:00
array_encoding.go Rename time batch decoders 2018-11-01 18:59:19 +00:00
array_encoding_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
batch_boolean.go Rename boolean batch decoders 2018-11-01 18:59:19 +00:00
batch_boolean_test.go Rename boolean batch decoders 2018-11-01 18:59:19 +00:00
batch_float.go Batch oriented float encoders 2018-11-01 18:59:19 +00:00
batch_float_test.go Batch oriented int encoders 2018-11-01 18:59:19 +00:00
batch_integer.go Batch oriented int encoders 2018-11-01 18:59:19 +00:00
batch_integer_test.go Batch oriented int encoders 2018-11-01 18:59:19 +00:00
batch_string.go Rename string batch decoders 2018-11-01 18:59:19 +00:00
batch_string_test.go Rename string batch decoders 2018-11-01 18:59:19 +00:00
batch_timestamp.go Rename time batch decoders 2018-11-01 18:59:19 +00:00
batch_timestamp_test.go Rename time batch decoders 2018-11-01 18:59:19 +00:00
bit_reader.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
bit_reader_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
bool.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
bool_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
cache.go Add skeleton buildtsi 2018-10-11 17:45:47 +01:00
cache_race_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
cache_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
compact.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
compact.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
compact.gen.go.tmpldata Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
compact.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
compact_test.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
encoding.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
encoding.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
encoding.gen.go.tmpldata Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
encoding.gen_test.go Update tsi1 package from OSS 2018-10-01 12:08:37 +01:00
encoding.go Pull in more pkg packages 2018-10-01 12:08:37 +01:00
encoding_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
engine.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
engine.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
engine.go tsdb: remove hll sketches 2018-10-31 15:41:39 -06:00
engine_cursor.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
engine_test.go tsm1: remove digests and backup/restore 2018-10-31 15:41:07 -06:00
file_store.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store.gen.go.tmpldata Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
file_store_array.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store_array_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store_key_iterator.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store_key_iterator_test.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
file_store_observer.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
file_store_test.go refactor: move the logger package from influxdb to platform 2018-10-10 15:49:07 -05:00
float.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
float_test.go Batch oriented float encoders 2018-11-01 18:59:19 +00:00
int.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
int_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
iterator.gen.go chore(fmt): fix and simplify go formatting 2018-10-08 17:23:54 -05:00
iterator.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
iterator.gen.go.tmpldata Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
iterator.go Remove the fields index 2018-10-15 10:22:07 -06:00
iterator_test.go refactor: move the logger package from influxdb to platform 2018-10-10 15:49:07 -05:00
mmap_unix.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
mmap_windows.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
pools.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
reader.gen.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
reader.gen.go.tmpl Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
reader.gen.go.tmpldata Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
reader.go storage: MeasurementStats.ReadFrom requires ByteReader 2018-10-19 14:16:20 -07:00
reader_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
ring.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
ring_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
scheduler.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
scheduler_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
stats.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
stats_test.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
string.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
string_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
timestamp.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
timestamp_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
tombstone.go chore(fmt): fix and simplify go formatting 2018-10-08 17:23:54 -05:00
tombstone_test.go Initial import of tsm1.Engine 2018-10-01 12:08:37 +01:00
wal.go Enable the WAL 2018-10-05 12:44:26 +01:00
wal_test.go Pull in more pkg packages 2018-10-01 12:08:37 +01:00
writer.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00
writer_test.go Add TSM1 measurement stats. 2018-10-08 10:43:53 -06:00