influxdb/pkg
Jeff Wendling cb9c3ee509 radix: optimize for our use case
- reduce allocations by making leaf a value type with a bool
- make longestPrefix inlineable and have no bounds checks
- delete any code for functions we don't plan to use
- operate on []byte and only copy when necessary
- inline calls to sort.Search to avoid allocations and indirections
- insert directly in the correct location for addEdge
- reduce allocations during copying with a buffer helper

results:

name              old time/op    new time/op     delta
Tree_Insert-8       1.10ms ± 4%     0.73ms ± 4%  -33.54%  (p=0.000 n=10+10)
Tree_InsertNew-8    3.18ms ± 2%     1.91ms ± 6%  -39.90%  (p=0.000 n=10+10)

name              old speed      new speed       delta
Tree_Insert-8     9.12MB/s ± 4%  13.72MB/s ± 4%  +50.46%  (p=0.000 n=10+10)
Tree_InsertNew-8  3.15MB/s ± 2%   5.24MB/s ± 6%  +66.42%  (p=0.000 n=10+10)

name              old alloc/op   new alloc/op    delta
Tree_InsertNew-8    1.62MB ± 0%     1.60MB ± 0%   -1.28%  (p=0.000 n=10+9)

name              old allocs/op  new allocs/op   delta
Tree_InsertNew-8     35.0k ± 0%      15.0k ± 0%  -57.04%  (p=0.000 n=10+10)

MB/sec in this case is 1 byte per key inserted, so it's really millions
of keys inserted per second.
2018-05-11 11:56:11 -06:00
..
binaryutil Partition series file. 2018-01-10 08:33:25 -07:00
bloom Cleanup pkg package 2018-01-21 12:08:25 -08:00
bytesutil Cleanup pkg package 2018-01-21 12:08:25 -08:00
deep Update godoc for pkg 2016-12-30 18:03:01 -08:00
escape pkg/escape: Add benchmarks for all bytes escape/unescape funcs 2018-01-16 11:12:47 +13:00
estimator tsdb/index: Add Bytes() methods (#9794) 2018-05-04 08:47:05 -07:00
file Save field types to speed up startup 2017-11-22 11:17:34 -07:00
limiter Rate limit disk IO when writing TSM files 2017-12-14 22:02:32 -07:00
metrics fix overflow for 32-bit architecture 2017-10-20 10:22:28 -07:00
mmap Reduce read IOPS in series file due to MADV_RANDOM 2018-01-31 12:38:16 -07:00
pool Cleanup pkg package 2018-01-21 12:08:25 -08:00
pprofutil Fix retain/release hang issues. 2017-12-06 09:09:41 -07:00
radix radix: optimize for our use case 2018-05-11 11:56:11 -06:00
rhh Reduce allocations when inserting into RHH 2018-01-31 12:38:11 -07:00
slices Merge master into branch 2017-12-08 17:11:07 +00:00
snowflake Generate trace logs for a number of significant influx operations 2018-02-21 15:08:49 -07:00
tar Fix stream package to allow for renaming the file before writing it to the stream (#9684) 2018-04-05 16:24:29 -04:00
testing/assert storage service 2017-10-25 13:38:07 -07:00
tracing Cleanup pkg package 2018-01-21 12:08:25 -08:00
README.md Correctly name pkg README 2015-12-17 11:24:58 -08:00

README.md

pkg/ is a collection of utility packages used by the InfluxDB project without being specific to its internals.

Utility packages are kept separate from the InfluxDB core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the InfluxDB organization, to facilitate re-use by other projects. However that is not the priority.

Because utility packages are small and neatly separated from the rest of the codebase, they are a good place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them!