diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-11-25 17:08:08 -0500 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2020-11-25 17:08:08 -0500 |
commit | ba9b4aab3daa4acbf6a8b0cc44f882e404e9f0e4 (patch) | |
tree | 974699a8ef908df852ef9f3c355740d85d583129 /comp_bench | |
parent | fb5c3d35f98f89adf55358a94fc3af761020b913 (diff) | |
download | minitramfs-ba9b4aab3daa4acbf6a8b0cc44f882e404e9f0e4.tar.xz minitramfs-ba9b4aab3daa4acbf6a8b0cc44f882e404e9f0e4.zip |
comp_bench: update, add zstd
Diffstat (limited to 'comp_bench')
-rwxr-xr-x | comp_bench | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -10,8 +10,9 @@ do_time() { } do_bench() { + tmpfile= + trap '[ -n "$tmpfile" ] && rm -f "$tmpfile"' HUP INT QUIT TERM EXIT tmpfile=$(mktemp) - trap 'rm -f "$tmpfile"' HUP INT QUIT TERM EXIT [ -z "$verbose" ] || printf '%s compression:\n' "$1" ${verbose+do_time} "$@" -c <initramfs.img >"$tmpfile" printf '%s size: %s bytes\n' "$1" "$(wc -c < "$tmpfile")" @@ -24,7 +25,7 @@ do_bench() { if [ -e initramfs.img ] && [ "$(file -b initramfs.img)" != "ASCII cpio archive (SVR4 with no CRC)" ]; then echo "warning: overwriting initramfs.img" >&2 - compressor=cat ./make > initramfs.img + COMPRESSOR=cat ./make fi do_bench gzip -9 do_bench bzip2 -9 @@ -32,3 +33,4 @@ do_bench lzma -9e --check=crc32 do_bench xz --check=crc32 --x86 --lzma2=preset=9e do_bench lzop -9 do_bench lz4 --best --favor-decSpeed -l +do_bench zstd -19 |