Here's the codemax=$1dateecho url: $2rate: $max calls / secondSTART=$(date +%s);get () {  curl -s -v $1 2>&1 | tr '\r\n' '\\n' | awk -v date=$(date +'%r') '{print $0\n-----, date}' >> /tmp/perf-test.log}while truedo  echo $(($(date +%s) - START)) | awk '{print int($1/60):int($1%60)}'  sleep 1  for i in `seq 1 $max`  do    get $2 &  donedoneThis can be run as sh load-test.sh 20 http://api.myserver.com/get_infoPlease suggest if you think there's a way to take in multiple curl options.
Simple load testing script in bash
bash;timer;curl
Arithmetics in BashYou're doing some math in Bash, some in Awk, some in a combination of both. You can do all of that in Bash alone. Most notably, instead of this:echo $(($(date +%s) - START)) | awk '{print int($1/60):int($1%60)}'This would be equivalent, but all in Bash, without additional processes:((delta = $(date +%s) - START))((minutes = delta / 60))((seconds = delta % 60))echo $minutes:$secondsDon't use seqseq is not portable, I suggest to avoid it. Instead of this: for i in `seq 1 $max`; do ...; doneYou can write:for ((i = 1; i < max; i++)); do ...; doneDon't use `...`This syntax is obsolete today, always use $(...) instead.Other minor thingsThis would be clearer as two echo lines, or a here-document with cat <<EOF:echo url: $2rate: $max calls / secondThe trailing semicolon is unnecessary:START=$(date +%s);The quoting is unnecessary in date +'%r', but it does no harm. 