Created
August 25, 2010 14:06
-
-
Save velenux/549570 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 | |
SRC=/home/velenux/c0ding/ # lots of small files, and some bigger ones mixed in | |
DEST=$1/velebench/ | |
echo "Starting test: " | |
echo " - SRC: ${SRC}" | |
echo " - DEST: ${DEST}" | |
echo "" | |
for run in $(seq 1 3); do | |
echo "Running test #${run}..." | |
if [ ! -d $DEST ]; then | |
mkdir -p $DEST | |
fi | |
echo ' * rsync' | |
rsync -a ${SRC} $DEST &>/dev/null | |
sync | |
echo ' * mp3' | |
for mp3 in $(seq 1 20); do | |
dd if=/dev/urandom of=${DEST}/mp3-${mp3}.mp3 bs=1M count=4 &>/dev/null | |
done | |
sync | |
echo ' * 100mb file' | |
dd if=/dev/zero of=${DEST}/one.img bs=1M count=100 &>/dev/null | |
sync | |
echo ' * 1Gb file' | |
dd if=/dev/zero of=${DEST}/two.img bs=4M count=250 &>/dev/null | |
sync | |
echo ' * removing' | |
rm -rf $DEST/ | |
sync | |
echo '' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment