diff options
author | Jakob Unterwurzacher | 2020-05-24 22:02:34 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2020-05-24 22:03:40 +0200 |
commit | 1a91a11e00546894325f3380488e2ad26bb5d27e (patch) | |
tree | 73a0c0a218d63f65abae0003321021b623e0f428 | |
parent | cb8872577d66ff0fc38bcd70493be06bc0f34ffa (diff) |
contrib/sshfs-benchmark.bash: add rmdir, mkdir, touch
And also, stop using the wrong directory for sshfs git init.
sshfs-benchmark.bash: sshfs gocryptfs-on-sshfs
git init 4.35 7.82
rsync 7.72 11.66
rm -R 2.71 11.04
mkdir 1.33 4.15
rmdir 0.47 3.97
touch 2.32 2.85
rm 0.45 0.45
-rwxr-xr-x | contrib/sshfs-benchmark.bash | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/contrib/sshfs-benchmark.bash b/contrib/sshfs-benchmark.bash index b3c9646..646262a 100755 --- a/contrib/sshfs-benchmark.bash +++ b/contrib/sshfs-benchmark.bash @@ -3,9 +3,10 @@ set -eu function cleanup { - fusermount -u -z gocryptfs.mnt || true + cd "$LOCAL_TMP" + fusermount -u gocryptfs.mnt rm -Rf "$SSHFS_TMP" - fusermount -u -z sshfs.mnt + fusermount -u sshfs.mnt cd / rm -Rf "$LOCAL_TMP" } @@ -35,19 +36,56 @@ HOST=$1 prepare_mounts -# Make the bash builtin "time" print out only the elapsed wall clock -# seconds -TIMEFORMAT=%R - echo echo "$MYNAME: sshfs gocryptfs-on-sshfs" echo -n "git init " -etime git init -q sshfs.mnt/git1 +etime git init -q "$SSHFS_TMP/git1" etime git init -q gocryptfs.mnt/git1 echo git init -q git2 echo -n "rsync " -etime rsync -a --no-group git2 sshfs.mnt +etime rsync -a --no-group git2 "$SSHFS_TMP" etime rsync -a --no-group git2 gocryptfs.mnt echo + +echo -n "rm -R " +etime rm -R "$SSHFS_TMP/git1" "$SSHFS_TMP/git2" +etime rm -R gocryptfs.mnt/git1 gocryptfs.mnt/git2 +echo + +echo -n "mkdir " +pushd "$SSHFS_TMP" > /dev/null +etime mkdir $(seq 1 20) +popd > /dev/null +cd gocryptfs.mnt +etime mkdir $(seq 1 20) +cd .. +echo + +echo -n "rmdir " +pushd "$SSHFS_TMP" > /dev/null +etime rmdir $(seq 1 20) +popd > /dev/null +cd gocryptfs.mnt +etime rmdir $(seq 1 20) +cd .. +echo + +echo -n "touch " +pushd "$SSHFS_TMP" > /dev/null +etime touch $(seq 101 120) +popd > /dev/null +cd gocryptfs.mnt +etime touch $(seq 101 120) +cd .. +echo + +echo -n "rm " +pushd "$SSHFS_TMP" > /dev/null +etime rm $(seq 101 120) +popd > /dev/null +cd gocryptfs.mnt +etime rm $(seq 101 120) +cd .. +echo |