moby/runconfig
Brian Goff 9a25b1d942 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>
2016-04-05 13:06:04 -04:00
..
fixtures Move the runconfig.Parse() function into the runconfig/opts package. 2016-01-04 12:06:29 -05:00
opts CLI flag for docker create(run) to change block device size. 2016-03-28 10:05:18 -04:00
compare.go Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c 2016-02-29 19:28:37 +08:00
compare_test.go Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c 2016-02-29 19:28:37 +08:00
config.go Remove runconfig package dependency from image and container routers. 2016-03-28 16:23:51 -04:00
config_test.go Vendor engine-api to 70d266e96080e3c3d63c55a4d8659e00ac1f7e6c 2016-02-29 19:28:37 +08:00
config_unix.go fix some typos. 2016-03-10 10:09:27 +08:00
config_windows.go fix some typos. 2016-03-10 10:09:27 +08:00
errors.go Allow --hostname with --net=host 2016-03-09 20:40:12 -05:00
hostconfig.go Modify import paths to point to the new engine-api package. 2016-01-06 19:48:59 -05:00
hostconfig_test.go Run privileged containers when userns are specified 2016-03-14 17:09:25 +02:00
hostconfig_unix.go Allow --hostname with --net=host 2016-03-09 20:40:12 -05:00
hostconfig_windows.go Windows libnetwork integration 2016-03-09 20:33:21 -08:00
streams.go Improve performance/reduce allocs of bytespipe 2016-04-05 13:06:04 -04:00