#!/usr/bin/env bash reqs=100000 concurrency=10 url='https://example.org' fileprefix='example_org' useragent="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1 apachebench" # apache bench with basic authentication ab -A username:password -H "User-Agent: $useragent" -n $reqs -c $concurrency -g ${fileprefix}_$(date +%F_%H%M%S)_r-${reqs}_c-${concurrency}.gnuplot $url > ${fileprefix}_$(date +%F_%H%M%S)_r-${reqs}_c-${concurrency}.log