benchmark: fix shellcheck issues
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
83ba541725
commit
f4cc7726e9
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue