Created
May 17, 2015 16:26
-
-
Save vitzli/a1bd4548a51178b737d7 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 | |
# This script is dangerous, make sure that IPFS_PATH dir exists! | |
export IPFS_PATH=/srv/ipfs_conf | |
TEST_FILE=/srv/test1/random.dat | |
# TEST_FILE=/srv-ssd/test2/random.dat | |
IPFS_TOOL1=ipfs | |
#IPFS_TOOL1=ipfs_pin | |
LOGFILE=/srv/test1/tester_result.txt | |
echo "--------START-----------" | |
echo "IPFS_PATH=$IPFS_PATH" | |
cd $IPFS_PATH | |
for i in `seq 1 10` | |
do | |
echo "-------------------------------------" | |
rm -r * | |
echo "TEST $i" | tee -a $LOGFILE | |
$IPFS_TOOL1 init | |
sync | |
sleep 10 | |
{ time $IPFS_TOOL1 add --quiet $TEST_FILE; } 2>&1 | grep -e '^real' | sed -e 's/real\t//' | tee -a $LOGFILE | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment