diff options
author | Filipp Lepalaan <filipp@mac.com> | 2010-03-14 08:31:49 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2010-03-14 08:31:49 +0200 |
commit | 7e0e116d4fc2a3d57e125770266e402f67ee815f (patch) | |
tree | 4921e673518630a91b6bbee0a8bb1f2da29bc261 /hellyeah.command | |
parent | 75e8f5f66e32aecf06e8817c2c91c9da543e87a5 (diff) | |
download | mtk-7e0e116d4fc2a3d57e125770266e402f67ee815f.tar.gz mtk-7e0e116d4fc2a3d57e125770266e402f67ee815f.tar.bz2 mtk-7e0e116d4fc2a3d57e125770266e402f67ee815f.zip |
Converted bloop to Bash
Diffstat (limited to 'hellyeah.command')
-rwxr-xr-x | hellyeah.command | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/hellyeah.command b/hellyeah.command deleted file mode 100755 index 1d9b339..0000000 --- a/hellyeah.command +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# hellyeah.command -# Do some stress testings -# @author Filipp Lepalaan <filipp@mcare.fi> - -MYDIR=/private/tmp/_hellyeah -CORES=$(sysctl hw.logicalcpu_max | cut -d : -f 2 | sed 's/ //') - -for (( i = 0; i < ${CORES}; i++ )); do - yes > /dev/null 2>&1 & -done - -if [[ ! -d "${MYDIR}" ]]; then - mkdir "${MYDIR}" -fi - -trap "killall yes; rm ${MYDIR}; echo Killed; exit 255" SIGINT SIGTERM - -while true; do - for k in 10 100 1000 10000; do - BLOCKS=$(($k*1024/512)) - OF="${MYDIR}/$(uuidgen)" - dd if=/dev/random of=${OF} count=${BLOCKS} > /dev/null 2>&1 - sleep 2 - echo "Wrote ${BLOCKS} blocks" - rm -rf "${OF}" - done -done - -exit 0 |