aptly/utils
Sjoerd Simons f61514edaf Allow disabling bzip2 compression for index files
Using bzip2 generates smaller index files (roughly 20% smaller Packages
files) but it comes with a big performance penalty.  When publishing a
debian mirror snapshot (amd64, arm64, armhf, source) without contents
skipping bzip speeds things up around 1.8 times.

```
$ hyperfine -w 1 -L skip-bz2 true,false  -m 3 -p "aptly -config aptly.conf publish drop bullseye || true" "aptly -config aptly.conf  publish snapshot  --skip-bz2={skip-bz2} --skip-contents --skip-signing bullseye"
Benchmark 1: aptly -config aptly.conf  publish snapshot  --skip-bz2=true --skip-contents --skip-signing bullseye
  Time (mean ± σ):     35.567 s ±  0.307 s    [User: 39.366 s, System: 10.075 s]
  Range (min … max):   35.311 s … 35.907 s    3 runs

Benchmark 2: aptly -config aptly.conf  publish snapshot  --skip-bz2=false --skip-contents --skip-signing bullseye
  Time (mean ± σ):     64.740 s ±  0.135 s    [User: 68.565 s, System: 10.129 s]
  Range (min … max):   64.596 s … 64.862 s    3 runs

Summary
  'aptly -config aptly.conf  publish snapshot  --skip-bz2=true --skip-contents --skip-signing bullseye' ran
    1.82 ± 0.02 times faster than 'aptly -config aptly.conf  publish snapshot  --skip-bz2=false --skip-contents --skip-signing bullseye'
```

Allow skipping bz2 creation for setups where faster publishing is more
important then Package file size.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2022-06-22 11:25:45 +02:00
..
checksum.go New ChecksumStorage and new PackagePool interfaces 2017-04-26 23:17:04 +03:00
checksum_test.go Implemented filesystem endpoint with support for hardlinks, symlinks and copy. 2017-04-13 20:25:40 +02:00
compress.go Use parallel gzip instead of gzip for compression 2022-06-21 15:43:58 +02:00
compress_test.go Fix compression test for Go 1.7+ 2016-11-28 17:14:36 +03:00
config.go Allow disabling bzip2 compression for index files 2022-06-22 11:25:45 +02:00
config_test.go Allow disabling bzip2 compression for index files 2022-06-22 11:25:45 +02:00
copyfile.go Simple CopyFile utility function. #71 2015-03-15 18:15:46 +03:00
human.go Style fixes from go vet. 2015-02-22 14:36:14 +03:00
human_test.go gofmt -s 2015-02-22 14:29:09 +03:00
list.go Add govet/golint into Travis CI build 2017-03-22 21:49:16 +03:00
list_test.go Add govet/golint into Travis CI build 2017-03-22 21:49:16 +03:00
utils.go Fix linter list and fix errors discovered by new staticcheck 2019-01-20 00:01:17 +03:00
utils_test.go gofmt -s 2015-02-22 14:29:09 +03:00