aboutsummaryrefslogtreecommitdiffstats
path: root/hellyeah.command
diff options
context:
space:
mode:
Diffstat (limited to 'hellyeah.command')
-rwxr-xr-xhellyeah.command25
1 files changed, 25 insertions, 0 deletions
diff --git a/hellyeah.command b/hellyeah.command
new file mode 100755
index 0000000..574862a
--- /dev/null
+++ b/hellyeah.command
@@ -0,0 +1,25 @@
+#!/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
+
+while [[ true ]]; do
+ for k in 10 100 1000 10000; do
+ BLOCKS=$(($k*1024/512))
+ dd if=/dev/random of="${MYDIR}/$(uuidgen)" count=${BLOCKS}
+ done
+ rm -rf "${MYDIR}/*"
+done
+
+exit 0