Created
January 30, 2022 07:45
-
-
Save hosni/48ffacb6a761e3b5d012e5a54f616b81 to your computer and use it in GitHub Desktop.
A function to measure the request time to a server, put it in your .zshrc or .bashrc
This file contains 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
curl_time() { | |
curl -so /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" "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment