Skip to content

Instantly share code, notes, and snippets.

@rjcorwin
Last active April 15, 2019 12:19
Show Gist options
  • Save rjcorwin/12c33c5abfa77bb1466cea8c3952110a to your computer and use it in GitHub Desktop.
Save rjcorwin/12c33c5abfa77bb1466cea8c3952110a to your computer and use it in GitHub Desktop.
TEST_ID=$(uuid)
echo "Running 100 with Test ID of $TEST_ID"
mkdir $TEST_ID
cd $TEST_ID
dat share &
sleep 5
for i in {1..100}
do
echo $(uuid) >> data.txt
du -s . | head -n1 | awk '{print $1}' >> ../$TEST_ID.summary.txt
done
echo "Disk usage:"
du -s .
TEST_1_RESULTS=$(du -s . | head -n1 | awk '{print $1}')
cd ..
TEST_ID=$(uuid)
echo "Running 1,000 with Test ID of $TEST_ID"
mkdir $TEST_ID
cd $TEST_ID
dat share &
sleep 5
for i in {1..1000}
do
echo $(uuid) >> data.txt
du -s . | head -n1 | awk '{print $1}' >> ../$TEST_ID.summary.txt
done
echo "Disk usage:"
du -s .
TEST_2_RESULTS=$(du -s . | head -n1 | awk '{print $1}')
cd ..
TEST_ID=$(uuid)
echo "Running 10,000 with Test ID of $TEST_ID"
mkdir $TEST_ID
cd $TEST_ID
dat share &
sleep 5
for i in {1..10000}
do
echo $(uuid) >> data.txt
du -s . | head -n1 | awk '{print $1}' >> ../$TEST_ID.summary.txt
done
echo "Disk usage:"
du -s .
TEST_3_RESULTS=$(du -s . | head -n1 | awk '{print $1}')
cd ..
TEST_ID=$(uuid)
echo "Running 100,000 with Test ID of $TEST_ID"
mkdir $TEST_ID
cd $TEST_ID
dat share &
sleep 5
for i in {1..100000}
do
echo $(uuid) >> data.txt
du -s . | head -n1 | awk '{print $1}' >> ../$TEST_ID.summary.txt
done
echo "Disk usage:"
du -s .
TEST_4_RESULTS=$(du -s . | head -n1 | awk '{print $1}')
cd ..
echo ""
echo ""
echo ""
echo "RESULTS: $TEST_1_RESULTS, $TEST_2_RESULTS, $TEST_3_RESULTS, $TEST_4_RESULTS"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment