Skip to content

Instantly share code, notes, and snippets.

@ummdorian
Created June 17, 2020 23:02
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 ummdorian/b8833fd1e8295a9ea9a7316311b692c5 to your computer and use it in GitHub Desktop.
Save ummdorian/b8833fd1e8295a9ea9a7316311b692c5 to your computer and use it in GitHub Desktop.
Concurrent Request Load Testing
#!/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}"'
@ummdorian
Copy link
Author

run with source ./loadtest.sh {number of concurrent requests}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment