2017-07-01 11:42:52 +02:00
|
|
|
#!/bin/bash -eu
|
|
|
|
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
# Download /tmp/linux-3.0.tar.gz
|
|
|
|
../tests/dl-linux-tarball.bash
|
|
|
|
|
|
|
|
T=$(mktemp -d)
|
2021-08-31 19:01:47 +02:00
|
|
|
mkdir "$T/a" "$T/b"
|
2017-07-01 11:42:52 +02:00
|
|
|
|
2021-08-31 19:01:47 +02:00
|
|
|
../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"
|
2017-07-01 11:42:52 +02:00
|
|
|
|
|
|
|
# Cleanup trap
|
|
|
|
trap "cd /; fusermount -u -z $T/b; rm -Rf $T/a" EXIT
|
|
|
|
|
|
|
|
echo "Extracting..."
|
2021-08-31 19:01:47 +02:00
|
|
|
time tar xzf /tmp/linux-3.0.tar.gz -C "$T/b"
|
2017-07-01 11:42:52 +02:00
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Hint: go tool pprof ../gocryptfs $T/cprof"
|
|
|
|
echo " go tool pprof -alloc_space ../gocryptfs $T/mprof"
|