diff options
author | Vratko Polak <vrpolak@cisco.com> | 2020-11-04 11:08:06 +0100 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2020-11-10 13:04:55 +0000 |
commit | 0faec5f2e995afe00c22d1d93735305c2b3c518c (patch) | |
tree | 3813e7d04c2471df996bbb36ae38552f735269ad /resources/libraries/bash | |
parent | 7a3493819aecf113146db608ce88287cebb4edae (diff) |
Speed up test archive compression
16 times faster setting at cost of 50% larger archive.
Before:
$ time ( cat tests.tar | xz -9e > tests.9e.tar.xz )
real 0m41.640s
user 0m41.009s
sys 0m0.602s
$ wc -c tests.9e.tar.xz
913432 tests.9e.tar.xz
After:
$ time ( cat tests.tar | xz -3 > tests.3.tar.xz )
real 0m2.422s
user 0m2.294s
sys 0m0.161s
$ wc -c tests.3.tar.xz
1556080 tests.3.tar.xz
Change-Id: Ia5c86183d4e19db3cbf95dd84cf86ee720ef4051
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/bash')
-rw-r--r-- | resources/libraries/bash/function/common.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index 2b1a7f5128..a144b3cc3a 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -145,7 +145,7 @@ function archive_tests () { set -exuo pipefail - tar c "${GENERATED_DIR}/tests" | xz -9e > "${ARCHIVE_DIR}/tests.tar.xz" || { + tar c "${GENERATED_DIR}/tests" | xz -3 > "${ARCHIVE_DIR}/tests.tar.xz" || { die "Error creating archive of generated tests." } } |