Created
June 17, 2020 23:02
-
-
Save ummdorian/b8833fd1e8295a9ea9a7316311b692c5 to your computer and use it in GitHub Desktop.
Concurrent Request Load Testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
count=$1 | |
echo "time | http_code | filesize | url"; | |
seq 1 $count | xargs -n1 -P$count bash -c 'i=$0; rand=$(openssl rand -base64 12); curl -o /dev/null -w "%{time_total} | %{http_code} | %{size_download} | %{url_effective}\n" -s "http://example.com/?${rand}"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run with source ./loadtest.sh {number of concurrent requests}