Skip to content

Instantly share code, notes, and snippets.

@GregGallant
Last active June 9, 2020 18:57
Show Gist options
  • Save GregGallant/19fff777e4fa2f19bef0184eb248329b to your computer and use it in GitHub Desktop.
Save GregGallant/19fff777e4fa2f19bef0184eb248329b to your computer and use it in GitHub Desktop.
Benchmarking Curl Requests (100x example)
#!/bin/sh
echo "time_connect \t time_appconnect \t time_pretransfer \t time_starttransfer\n"
# Run 100 times
for i in `seq 1 100`; do curl -H "Authorization: Bearer 1234" -s -o /dev/null -w '%{time_connect}, %{time_appconnect}, %{time_pretransfer}, %{time_starttransfer}\n' "https://mgmt.auth.sample.com/esm/v2.1/media-company/year/month?media-company=Discovery&requestor-id=&proxy=&mvpd=Comcast"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment