Commit e3d026ae authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

benchmarking: use awk instead of bc

parent 0d0684ac
...@@ -7,7 +7,7 @@ fi ...@@ -7,7 +7,7 @@ fi
rm -f dec.dat rm -f dec.dat
bsize=$(wc -c bench.dat | awk '{print $1}') bsize=$(wc -c bench.dat | awk '{print $1}')
utime=$(./utime ./aec -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&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 ***" echo "*** Decoding with $perf MiB/s user time ***"
cmp bench.dat dec.dat cmp bench.dat dec.dat
rm -f dec.dat rm -f dec.dat
...@@ -13,6 +13,7 @@ if [ ! -f bench.dat ]; then ...@@ -13,6 +13,7 @@ if [ ! -f bench.dat ]; then
fi fi
rm -f bench.rz rm -f bench.rz
utime=$(./utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1) utime=$(./utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1)
echo $utime
bsize=$(wc -c bench.dat | awk '{print $1}') 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 ***" echo "*** Encoding with $perf MiB/s user time ***"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment