From 8aefad5afe3fb681dfbd606ee49d0495c7471239 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 11 Dec 2023 03:03:50 +0100 Subject: Add a function to get TTFB --- functions/curl_time.fish | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3