From: Vratko Polak Date: Wed, 4 Nov 2020 10:08:06 +0000 (+0100) Subject: Speed up test archive compression X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=commitdiff_plain;h=0faec5f2e995afe00c22d1d93735305c2b3c518c 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 --- 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." } }