profiling: add tar-extract helper
Extracts the linux-3.0.tar.gz tarball while capturing memory and cpu profiles.
This commit is contained in:
parent
52a8e14332
commit
b256c39271
23
profiling/tar-extract.bash
Executable file
23
profiling/tar-extract.bash
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Download /tmp/linux-3.0.tar.gz
|
||||
../tests/dl-linux-tarball.bash
|
||||
|
||||
T=$(mktemp -d)
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
echo
|
||||
echo "Hint: go tool pprof ../gocryptfs $T/cprof"
|
||||
echo " go tool pprof -alloc_space ../gocryptfs $T/mprof"
|
Loading…
Reference in New Issue
Block a user