diff options
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 |