diff options
author | ache <ache@ache.one> | 2023-12-11 03:03:50 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2023-12-11 03:03:50 +0100 |
commit | 8aefad5afe3fb681dfbd606ee49d0495c7471239 (patch) | |
tree | fd0dc1baa2319ca12e2e9252ee287e63f6099c42 | |
parent | Fix passc alias (diff) |
Add a function to get TTFB
-rw-r--r-- | functions/curl_time.fish | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/functions/curl_time.fish b/functions/curl_time.fish index db03741..972ced0 100644 --- a/functions/curl_time.fish +++ b/functions/curl_time.fish @@ -1 +1,6 @@ -alias curl_time='curl -L -w "time_namelookup: %{time_namelookup}\ntime_connect: %{time_connect}\ntime_appconnect: %{time_appconnect}\ntime_pretransfer: %{time_pretransfer}\ntime_redirect: %{time_redirect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" -o /dev/null' +function curl_time --wraps=curl --description "Get timming information from curl" + for url in $argv + echo "reaching: $url" + curl -L -w "time_namelookup: %{time_namelookup}\ntime_connect: %{time_connect}\ntime_appconnect: %{time_appconnect}\ntime_pretransfer: %{time_pretransfer}\ntime_redirect: %{time_redirect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n" -o /dev/null $url + end +end |