summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathis Rosenhauer <rosenhauer@dkrz.de>2017-10-13 11:49:40 (GMT)
committerMathis Rosenhauer <rosenhauer@dkrz.de>2017-10-13 11:49:40 (GMT)
commite3d026ae13d2ff0bf9237382e9046ecc9d06e867 (patch)
tree868b827ea6dd8c64ca27ad667c45f0e341f9778d
parent0d0684ac0fea8eef2029af0ec939143bdfaf290c (diff)
downloadlibaec-e3d026ae13d2ff0bf9237382e9046ecc9d06e867.zip
libaec-e3d026ae13d2ff0bf9237382e9046ecc9d06e867.tar.gz
libaec-e3d026ae13d2ff0bf9237382e9046ecc9d06e867.tar.bz2
benchmarking: use awk instead of bc
-rwxr-xr-xsrc/bdec.sh2
-rwxr-xr-xsrc/benc.sh3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/bdec.sh b/src/bdec.sh
index 10da618..5b473d8 100755
--- a/src/bdec.sh
+++ b/src/bdec.sh
@@ -7,7 +7,7 @@ fi
rm -f dec.dat
bsize=$(wc -c bench.dat | awk '{print $1}')
utime=$(./utime ./aec -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&1)
-perf=$(echo "$bsize/1048576/$utime" | bc)
+perf=$(awk "BEGIN {print ${bsize}/1048576/${utime}}")
echo "*** Decoding with $perf MiB/s user time ***"
cmp bench.dat dec.dat
rm -f dec.dat
diff --git a/src/benc.sh b/src/benc.sh
index e2f8075..5bc031c 100755
--- a/src/benc.sh
+++ b/src/benc.sh
@@ -13,6 +13,7 @@ if [ ! -f bench.dat ]; then
fi
rm -f bench.rz
utime=$(./utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1)
+echo $utime
bsize=$(wc -c bench.dat | awk '{print $1}')
-perf=$(echo "$bsize/1048576/$utime" | bc)
+perf=$(awk "BEGIN {print ${bsize}/1048576/${utime}}")
echo "*** Encoding with $perf MiB/s user time ***"