Automate standard performance tests

This commit is contained in:
Jakob Unterwurzacher 2016-01-23 19:33:03 +01:00
parent ea38ff4e0b
commit 4a1768a314
2 changed files with 44 additions and 9 deletions

View File

@ -3,16 +3,17 @@ The used test archive is https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.
(mirror: http://ftp.linux.org.uk/pub/linux/linux-3.0/linux-3.0.tar.gz).
The archive is placed on tmpfs as well.
WRITE: dd if=/dev/zero of=zero bs=128K count=1000
UNTAR: time tar xfz ../linux-3.0.tar.gz
LS: time ls -lR linux-3.0 > /dev/null
RM: time rm -Rf linux-3.0
VERSION UNTAR LS RM
v0.4 48 1.5 5
v0.5-rc1 56 7 19
v0.5-rc1-1 54 4.1 9
v0.5-rc1-2 45 1.7 3.4
v0.6 47 1.8 4.3
v0.7 43 1.7 4.3
v0.7.2 26 1.8 4.3
VERSION WRITE UNTAR LS RM
v0.4 48 1.5 5
v0.5-rc1 56 7 19
v0.5-rc1-1 54 4.1 9
v0.5-rc1-2 45 1.7 3.4
v0.6 47 1.8 4.3
v0.7 43 1.7 4.3
v0.7.2 26 1.8 4.3
v0.8 23 1.8 4.3

34
benchmarks-external.bash Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
set -eu
TIME="/usr/bin/time -f %e"
# Setup
cd /tmp
wget -q -c https://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.gz
DIR1=$(mktemp -d)
DIR2=$(mktemp -d)
gocryptfs -q -init -extpass="echo test" $DIR1
gocryptfs -q -extpass="echo test" $DIR1 $DIR2
cd $DIR2
echo
# Benchmarks
echo -n "WRITE: "
dd if=/dev/zero of=zero bs=128K count=1000 2>&1 | tail -n 1
rm zero
sleep 1
echo -n "UNTAR: "
$TIME tar xzf ../linux-3.0.tar.gz
sleep 1
echo -n "LS: "
$TIME ls -lR linux-3.0 > /dev/null
sleep 1
echo -n "RM: "
$TIME rm -Rf linux-3.0
# Cleanup
cd ..
fusermount -u $DIR2 -z
rm -Rf $DIR1 $DIR2