Skip to content

Instantly share code, notes, and snippets.

@ZiTAL ZiTAL/curl_time.sh
Created Mar 18, 2019

Embed
What would you like to do?
curl: get response time
#!/bin/bash
# based on:
# https://stackoverflow.com/a/47944496/454827
# https://stackoverflow.com/a/49502232/454827
#curl --silent --output /dev/null -w "
#namelookup: %{time_namelookup}s\n\
#connect: %{time_connect}s\n\
#appconnect: %{time_appconnect}s\n\
#pretransfer: %{time_pretransfer}s\n\
#redirect: %{time_redirect}s\n\
#starttransfer: %{time_starttransfer}s\n\
#-------------------------\n\
#total: %{time_total}s\n" "$@"
echo "url: "$1
curl --silent --output /dev/null -w "time: %{time_total}s\n" "$@"
echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.