Files
docker-cli/components/engine/pkg
Brian Goff 933477cfba Improve performance/reduce allocs of bytespipe
Creates a `fixedBuffer` type that is used to encapsulate functionality
for reading/writing from the underlying byte slices.

Uses lazily-loaded set of sync.Pools for storing buffers that are no
longer needed so they can be re-used.

```
benchmark                     old ns/op     new ns/op     delta
BenchmarkBytesPipeWrite-8     138469        48985         -64.62%
BenchmarkBytesPipeRead-8      130922        56601         -56.77%

benchmark                     old allocs     new allocs     delta
BenchmarkBytesPipeWrite-8     18             8              -55.56%
BenchmarkBytesPipeRead-8      0              0              +0.00%

benchmark                     old bytes     new bytes     delta
BenchmarkBytesPipeWrite-8     66903         1649          -97.54%
BenchmarkBytesPipeRead-8      0             1             +Inf%
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9a25b1d942da88439ec04797ff6f1c33c3b5562d
Component: engine
2016-04-05 13:06:04 -04:00
..
2015-12-13 18:04:12 +02:00
2016-03-21 22:03:24 -07:00
2016-03-23 15:34:15 -04:00
2015-07-27 21:26:21 +02:00
2015-12-13 18:04:12 +02:00
2015-12-13 18:04:12 +02:00
2016-03-25 22:14:27 -04:00
2015-12-22 13:31:43 -05:00
2016-03-08 07:55:01 -08:00
2016-03-31 11:39:59 -07:00
2015-11-02 08:02:25 -08:00
2015-12-17 11:52:23 +01:00

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

Utility packages are kept separate from the docker 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 Docker organization, to facilitate re-use by other projects. However that is not the priority.

The directory pkg is named after the same directory in the camlistore project. Since Brad is a core Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad!

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!