Skip to content

Instantly share code, notes, and snippets.

Created August 6, 2016 14:38
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 anonymous/c4e1298da9bc2eef8ffb2fc4674f74d6 to your computer and use it in GitHub Desktop.
Save anonymous/c4e1298da9bc2eef8ffb2fc4674f74d6 to your computer and use it in GitHub Desktop.
#!/bin/sh
PORT=8080
ADDR=127.0.0.1
WRK=/usr/bin/wrk
FAST=test/fast.pl
PID=/tmp/prefork.pid
for workers in 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82; do
echo ''
echo ======== running with $workers workers
perl $FAST prefork -w $workers -c 16 -a 0 -r 1000 -m production -l http://$ADDR:$PORT &
sleep 2
$WRK -c 128 -d 30s http://$ADDR:$PORT/
sleep 2
while [ -f $PID ]; do
kill $(cat $PID)
sleep 1
done
echo ========
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment