Skip to content

Instantly share code, notes, and snippets.

@TimDumol
Created February 10, 2014 23:37
Show Gist options
  • Save TimDumol/8926467 to your computer and use it in GitHub Desktop.
Save TimDumol/8926467 to your computer and use it in GitHub Desktop.
#!/bin/bash
NUM_TRIES=10
NUM_REQ_BATCHES=4
NUM_REQS_PER_BATCH=2
for i in $(seq $NUM_TRIES)
do
pserve development.ini &
pid=$!
sleep 3
for j in $(seq $NUM_REQ_BATCHES)
do
for k in $(seq $NUM_REQS_PER_BATCH)
do
http --session superman --check-status GET http://localhost/api/recruiter/candidates/960 > /dev/null &
pids[$k]=$!
done
for k in $(seq $NUM_REQS_PER_BATCH)
do
wait ${pids[$k]}
done
done
kill $pid
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment