From e799ae672d64e6d3f943f79cda67be12a2b999e1 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 23 Jan 2016 20:17:34 +0100 Subject: Show new benchmark.bash in README The old benchmark is in benchmark-builtin.bash. renamed: benchmarks-builtin.bash -> benchmark-builtin.bash renamed: benchmarks-external.bash -> benchmark.bash --- benchmark.bash | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 benchmark.bash (limited to 'benchmark.bash') diff --git a/benchmark.bash b/benchmark.bash new file mode 100755 index 0000000..55f6fa2 --- /dev/null +++ b/benchmark.bash @@ -0,0 +1,36 @@ +#!/bin/bash + +# Run the set of "canonical" benchmarks that are shown on +# https://nuetzlich.net/gocryptfs/comparison/ + +set -eu + +TIME="/usr/bin/time -f %e" + +# Setup +cd /tmp +wget -nv --show-progress -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 + +# 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 -- cgit v1.2.3