bench.sh: calculate average and units/s