2016-07-16 18:08:01 +02:00
|
|
|
#!/bin/bash -eu
|
|
|
|
#
|
|
|
|
# Run the set of "canonical" benchmarks that are shown on
|
|
|
|
# https://nuetzlich.net/gocryptfs/comparison/
|
|
|
|
# against the directory passed as "$1".
|
|
|
|
#
|
|
|
|
# This is called by the top-level script "benchmark.bash".
|
|
|
|
|
2017-01-03 14:17:19 +01:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
MYNAME=$(basename "$0")
|
|
|
|
|
2016-07-16 18:08:01 +02:00
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
echo "usage: $MYNAME TESTDIR"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-01-03 14:17:19 +01:00
|
|
|
# Download /tmp/linux-3.0.tar.gz
|
|
|
|
./dl-linux-tarball.bash
|
|
|
|
|
2016-12-13 22:13:12 +01:00
|
|
|
# cd to TESTDIR
|
2016-07-16 18:08:01 +02:00
|
|
|
cd "$1"
|
|
|
|
|
|
|
|
function etime {
|
|
|
|
LC_ALL=C /usr/bin/time -f %e 2>&1 $@ > /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
echo -n "WRITE: "
|
2016-12-13 22:13:12 +01:00
|
|
|
dd if=/dev/zero of=zero bs=131072 count=2000 2>&1 | tail -n 1
|
2016-07-16 18:08:01 +02:00
|
|
|
rm zero
|
|
|
|
sleep 1
|
|
|
|
echo -n "UNTAR: "
|
2017-01-03 14:17:19 +01:00
|
|
|
etime tar xzf /tmp/linux-3.0.tar.gz
|
2016-07-16 18:08:01 +02:00
|
|
|
sleep 1
|
|
|
|
echo -n "LS: "
|
|
|
|
etime ls -lR linux-3.0
|
|
|
|
sleep 1
|
|
|
|
echo -n "RM: "
|
|
|
|
etime rm -Rf linux-3.0
|