cURL 에서 timing 정보 얻기

in curl •  6 years ago 

Links

Prepare a text file for formatted output

$ cat ~/.curl-format.txt
   time_namelookup:  %{time_namelookup}\n
      time_connect:  %{time_connect}\n
   time_appconnect:  %{time_appconnect}\n
  time_pretransfer:  %{time_pretransfer}\n
     time_redirect:  %{time_redirect}\n
time_starttransfer:  %{time_starttransfer}\n
--------------------------\n
        time_total:  %{time_total}\n

Add an alias for extended cURL command

$ tail -n 1 ~/.bashrc
alias curltime="curl -w \"@$HOME/.curl-format.txt\" -o NUL -s "

An example

$ curltime http://www.microsoft.com
   time_namelookup:  0.125
      time_connect:  0.000
   time_appconnect:  0.000
  time_pretransfer:  0.000
     time_redirect:  0.000
time_starttransfer:  0.000
--------------------------
        time_total:  0.125
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @jinahya! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Do not miss the last post from @steemitboard:

Valentine challenge - Love is in the air!

Support SteemitBoard's project! Vote for its witness and get one more award!

Hello @jinahya! This is a friendly reminder that you have 3000 Partiko Points unclaimed in your Partiko account!

Partiko is a fast and beautiful mobile app for Steem, and it’s the most popular Steem mobile app out there! Download Partiko using the link below and login using SteemConnect to claim your 3000 Partiko points! You can easily convert them into Steem token!

https://partiko.app/referral/partiko

Congratulations @jinahya! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

Valentine's day challenge - Give a badge to your beloved!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!