Skip to content

Instantly share code, notes, and snippets.

@lrvick
Created April 1, 2015 22:40
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 lrvick/2819de7df4eb8527df45 to your computer and use it in GitHub Desktop.
Save lrvick/2819de7df4eb8527df45 to your computer and use it in GitHub Desktop.
Simple siege runner to test multiple steps of workers and log results for quick comparison.
#!/bin/bash
URL=$1
LOG_FILE=$2
WORKER_STEPS=( 10 100 200 500 1000 1500 )
DELAY=10
TEST_LENGTH=60s
for WORKERS in "${WORKER_STEPS[@]}"; do
echo "WORKERS = $WORKERS"
echo "WORKERS = $WORKERS" >> $LOG_FILE
siege -t${TEST_LENGTH} -c${WORKERS} -d${DELAY} ${URL} >> $LOG_FILE 2>&1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment