리셋 되지 말자

How do I measure request and response times at once using cURL 본문

Linux Tips

How do I measure request and response times at once using cURL

kyeongjun-dev 2023. 4. 24. 11:18

참고사이트

https://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl

 

How do I measure request and response times at once using cURL?

I have a web service that receives data in JSON format, processes the data, and then returns the result to the requester. I want to measure the request, response, and total time using cURL. My ex...

stackoverflow.com

 

사용법

Create a new file, curl-format.txt, and paste in:

     time_namelookup:  %{time_namelookup}s\n
        time_connect:  %{time_connect}s\n
     time_appconnect:  %{time_appconnect}s\n
    time_pretransfer:  %{time_pretransfer}s\n
       time_redirect:  %{time_redirect}s\n
  time_starttransfer:  %{time_starttransfer}s\n
                     ----------\n
          time_total:  %{time_total}s\n

Make a request:

curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/"
Comments