Skip to content

Instantly share code, notes, and snippets.

@vitzli
Created May 17, 2015 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitzli/a1bd4548a51178b737d7 to your computer and use it in GitHub Desktop.
Save vitzli/a1bd4548a51178b737d7 to your computer and use it in GitHub Desktop.
#!/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