-
-
Save whyrusleeping/646c97b89ae4501a7eb7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
runs=10 | |
fsize=32 | |
rm timing && touch timing | |
for i in `seq 25`; do | |
touch timing-temp | |
for j in `seq $runs`; do | |
printf "\r \rsize %s: %s/%s" $fsize $j $runs | |
file=TESTFILE | |
dd if=/dev/urandom of=$file bs=$fsize count=1 2> /dev/null | |
/usr/bin/time -f '%e' ipfs add -q $file > hash 2>> timing-temp | |
rm $file | |
done | |
echo "" | |
printf "%s," $fsize >> timing | |
for t in `cat timing-temp`; do | |
printf "%s," $t >> timing | |
done | |
printf "\n" >> timing | |
rm timing-temp | |
fsize=$(expr $fsize '*' 2) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment