aboutsummaryrefslogtreecommitdiff
path: root/profiling
diff options
context:
space:
mode:
Diffstat (limited to 'profiling')
-rwxr-xr-xprofiling/ls.bash18
-rwxr-xr-xprofiling/streaming-read.bash16
-rwxr-xr-xprofiling/streaming-write.bash10
-rwxr-xr-xprofiling/tar-extract.bash10
-rwxr-xr-xprofiling/write-trace.bash10
5 files changed, 32 insertions, 32 deletions
diff --git a/profiling/ls.bash b/profiling/ls.bash
index 5f736b6..d8d55f6 100755
--- a/profiling/ls.bash
+++ b/profiling/ls.bash
@@ -6,10 +6,10 @@ cd "$(dirname "$0")"
../tests/dl-linux-tarball.bash
T=$(mktemp -d)
-mkdir $T/a $T/b
+mkdir "$T/a" "$T/b"
-../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" $T/a
-../gocryptfs -quiet -nosyslog -extpass "echo test" $T/a $T/b
+../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" "$T/a"
+../gocryptfs -quiet -nosyslog -extpass "echo test" "$T/a" "$T/b"
# Cleanup trap
trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
@@ -17,20 +17,20 @@ trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
echo "Creating 40000 empty files (linux-3.0.tar.gz contains 36782 files)..."
SECONDS=0
for dir in $(seq -w 1 200); do
- mkdir $T/b/$dir
- ( cd $T/b/$dir ; touch $(seq -w 1 200) )
+ mkdir "$T/b/$dir"
+ ( cd "$T/b/$dir" ; touch $(seq -w 1 200) )
done
echo "done, $SECONDS seconds"
echo "Remount..."
-fusermount -u $T/b
-../gocryptfs -quiet -nosyslog -extpass "echo test" -cpuprofile $T/cprof -memprofile $T/mprof \
- $T/a $T/b
+fusermount -u "$T/b"
+../gocryptfs -quiet -nosyslog -extpass "echo test" -cpuprofile "$T/cprof" -memprofile "$T/mprof" \
+ "$T/a" "$T/b"
echo "Running ls under profiler (3x)..."
for i in 1 2 3; do
SECONDS=0
-ls -lR $T/b > /dev/null
+ls -lR "$T/b" > /dev/null
echo "$i done, $SECONDS seconds"
done
diff --git a/profiling/streaming-read.bash b/profiling/streaming-read.bash
index df75c68..ef55138 100755
--- a/profiling/streaming-read.bash
+++ b/profiling/streaming-read.bash
@@ -3,25 +3,25 @@
cd "$(dirname "$0")"
T=$(mktemp -d)
-mkdir $T/a $T/b
+mkdir "$T/a" "$T/b"
-../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" $T/a
-../gocryptfs -quiet -extpass "echo test" $T/a $T/b
+../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" "$T/a"
+../gocryptfs -quiet -extpass "echo test" "$T/a" "$T/b"
# Cleanup trap
trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
# Write 100MB test file
-dd if=/dev/zero of=$T/b/zero bs=1M count=100 status=none
+dd if=/dev/zero of="$T/b/zero" bs=1M count=100 status=none
# Remount with profiling
-fusermount -u $T/b
-../gocryptfs -quiet -extpass "echo test" -cpuprofile $T/cprof -memprofile $T/mprof \
- $T/a $T/b
+fusermount -u "$T/b"
+../gocryptfs -quiet -extpass "echo test" -cpuprofile "$T/cprof" -memprofile "$T/mprof" \
+ "$T/a" "$T/b"
# Read 10 x 100MB instead of 1 x 1GB to keep the used disk space low
for i in $(seq 1 10); do
- dd if=$T/b/zero of=/dev/null bs=1M count=100
+ dd if="$T/b/zero" of=/dev/null bs=1M count=100
done
echo
diff --git a/profiling/streaming-write.bash b/profiling/streaming-write.bash
index 7732cfb..2cd74ad 100755
--- a/profiling/streaming-write.bash
+++ b/profiling/streaming-write.bash
@@ -3,18 +3,18 @@
cd "$(dirname "$0")"
T=$(mktemp -d)
-mkdir $T/a $T/b
+mkdir "$T/a" "$T/b"
-../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" $T/a
-../gocryptfs -quiet -extpass "echo test" -cpuprofile $T/cprof -memprofile $T/mprof \
- $T/a $T/b
+../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" "$T/a"
+../gocryptfs -quiet -extpass "echo test" -cpuprofile "$T/cprof" -memprofile "$T/mprof" \
+ "$T/a" "$T/b"
# Cleanup trap
trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
# Write 10 x 100MB instead of 1 x 1GB to keep the used disk space low
for i in $(seq 1 10); do
- dd if=/dev/zero of=$T/b/zero bs=1M count=100
+ dd if=/dev/zero of="$T/b/zero" bs=1M count=100
done
echo
diff --git a/profiling/tar-extract.bash b/profiling/tar-extract.bash
index 21b2e2b..25f99a6 100755
--- a/profiling/tar-extract.bash
+++ b/profiling/tar-extract.bash
@@ -6,17 +6,17 @@ cd "$(dirname "$0")"
../tests/dl-linux-tarball.bash
T=$(mktemp -d)
-mkdir $T/a $T/b
+mkdir "$T/a" "$T/b"
-../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" $T/a
-../gocryptfs -quiet -extpass "echo test" -cpuprofile $T/cprof -memprofile $T/mprof \
- $T/a $T/b
+../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" "$T/a"
+../gocryptfs -quiet -extpass "echo test" -cpuprofile "$T/cprof" -memprofile "$T/mprof" \
+ "$T/a" "$T/b"
# Cleanup trap
trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
echo "Extracting..."
-time tar xzf /tmp/linux-3.0.tar.gz -C $T/b
+time tar xzf /tmp/linux-3.0.tar.gz -C "$T/b"
echo
echo "Hint: go tool pprof ../gocryptfs $T/cprof"
diff --git a/profiling/write-trace.bash b/profiling/write-trace.bash
index 3475140..bb1de1a 100755
--- a/profiling/write-trace.bash
+++ b/profiling/write-trace.bash
@@ -6,17 +6,17 @@
cd "$(dirname "$0")"
T=$(mktemp -d)
-mkdir $T/a $T/b
+mkdir "$T/a" "$T/b"
-../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" $T/a
-../gocryptfs -quiet -extpass "echo test" -trace $T/trace \
- $T/a $T/b
+../gocryptfs -init -quiet -scryptn 10 -extpass "echo test" "$T/a"
+../gocryptfs -quiet -extpass "echo test" -trace "$T/trace" \
+ "$T/a" "$T/b"
# Cleanup trap
trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
# Write only 1x100MB, otherwise the trace gets too big.
-dd if=/dev/zero of=$T/b/zero bs=1M count=100
+dd if=/dev/zero of="$T/b/zero" bs=1M count=100
echo
echo "Hint: go tool trace $T/trace"