bench.sh (544B)
1 #!/usr/bin/zsh 2 3 WORKLOAD="$1" 4 5 set -x 6 7 for a in 1 2 3; do time sed 's/^/locate /' "$WORKLOAD" | sh > /dev/null; done 8 for a in 1 2 3; do time sed 's/^/locate.findutils /' "$WORKLOAD" | sh > /dev/null; done 9 for a in 1 2 3; do time sed 's/^/grep /;s/$/ files/' "$WORKLOAD" | sh > /dev/null; done 10 for a in 1 2 3; do time sed 's/^/LC_ALL=C grep /;s/$/ files/' "$WORKLOAD" | sh > /dev/null; done 11 12 for s in glocate glocate.gzip glocate.pigz glocate.lz4; do 13 for a in 1 2 3; do 14 time sed 's/^/.\/'$s' /;' "$WORKLOAD" | sh > /dev/null; 15 done 16 done 17