benchmark: fix shellcheck issues

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-03-09 17:19:40 +03:00 committed by Alex Vanin
parent 83ba541725
commit f4cc7726e9

View file

@ -1,12 +1,14 @@
#!/bin/bash #!/bin/bash
tmpfile=$(mktemp /tmp/random-file.XXXXXX) BLOCK_SIZE=${1:-1G} # gigabyte by default
dd if=/dev/urandom of=$tmpfile bs=$1 count=1 OUT="${OUT:-$(mktemp /tmp/random-file.XXXXXX)}"
dd if=/dev/urandom of="$OUT" bs="$BLOCK_SIZE" count=1
go build ./cmd/tzsum || exit 1 go build ./cmd/tzsum || exit 1
for impl in avx avx2 generic; do for impl in avx avx2 generic; do
echo $impl implementation: echo $impl implementation:
time ./tzsum -name $tmpfile -impl $impl time ./tzsum -name "$OUT" -impl $impl
echo echo
done done