3 # Produces a .tar file (if one doesn't exist as $TARFILE), then
4 # times how long it takes to untar it onto the current directory.
6 TARFILE=${TARFILE:=/var/tmp/bench.tar.gz}
17 if [ ! -f $TARFILE ]; then
18 ( cd / && tar czf $TARFILE $source ) || barf "tar cz failed"
24 # %U=user %S=system %E=elapsed
26 size=`ls -Llh $TARFILE | awk '{print $5}'`
27 time=`/usr/bin/time -f '%U, %S, %E' tar xzf $TARFILE 2>&1`
31 [ $status -eq 0 ] || exit 1
32 printf "%6s, %s\n" "$size" "$time"
36 printf "%6s,%5s,%5s,%8s\n" sz usr sys real