blob: 09532b65fe78914a041cbd461f6072f144355e38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash -eu
# Run the set of "canonical" benchmarks that are shown on
# https://nuetzlich.net/gocryptfs/comparison/
cd "$(dirname "$0")"
# Setup
CRYPT=$(mktemp -d /tmp/benchmark.bash.XXX)
MNT=$CRYPT.mnt
mkdir $MNT
# Mount
if [ $# -eq 1 ] && [ "$1" == "-encfs" ]; then
echo "Testing EncFS at $MNT"
encfs --extpass="echo test" --standard $CRYPT $MNT > /dev/null
else
echo "Testing gocryptfs at $MNT"
gocryptfs -q -init -extpass="echo test" -scryptn=10 $CRYPT
gocryptfs -q -extpass="echo test" $CRYPT $MNT
fi
# Cleanup trap
trap "cd /; fusermount -u -z $MNT; rm -rf $CRYPT $MNT" EXIT
# Benchmarks
./tests/canonical-benchmarks.bash $MNT
|