diff options
| author | Jakob Unterwurzacher | 2017-06-11 12:05:59 +0200 | 
|---|---|---|
| committer | Jakob Unterwurzacher | 2017-06-11 12:05:59 +0200 | 
| commit | f351c3c1ecf30bd88b9246d45ba39cd259047a3c (patch) | |
| tree | 17391dc0850620592992a02be639654edf0a034a | |
| parent | b5358ea623f3b4fc3c56dede5a2a2b75fe38fbc2 (diff) | |
benchmark.bash: add dd-only mode, enable via "-dd"
Allows for quickly testing the streaming write throughput.
| -rwxr-xr-x | benchmark.bash | 14 | 
1 files changed, 12 insertions, 2 deletions
| diff --git a/benchmark.bash b/benchmark.bash index b1c334e..8bc6abb 100755 --- a/benchmark.bash +++ b/benchmark.bash @@ -8,12 +8,13 @@ MYNAME=$(basename "$0")  source tests/fuse-unmount.bash  function usage { -	echo "Usage: $MYNAME [-encfs] [-openssl=true] [-openssl=false] [DIR]" +	echo "Usage: $MYNAME [-encfs] [-openssl=true] [-openssl=false] [-dd] [DIR]"  }  OPT_ENCFS=0  OPT_OPENSSL=""  OPT_DIR="" +DD_ONLY=""  while [[ $# -gt 0 ]] ; do  	case $1 in @@ -30,6 +31,9 @@ while [[ $# -gt 0 ]] ; do  		-openssl=false)  			OPT_OPENSSL="-openssl=false"  			;; +		-dd) +			DD_ONLY=1 +			;;  		-*)  			echo "Invalid option: $1"  			usage @@ -74,5 +78,11 @@ fi  trap "cd /; fuse-unmount -z $MNT; rm -rf $CRYPT $MNT" EXIT  # Benchmarks -./tests/canonical-benchmarks.bash $MNT +if [[ $DD_ONLY -eq 1 ]]; then +	echo -n "WRITE: " +	dd if=/dev/zero of=$MNT/zero bs=131072 count=2000 2>&1 | tail -n 1 +	rm $MNT/zero +else +	./tests/canonical-benchmarks.bash $MNT +fi | 
