Use the Curl Command to view the request response time method

Source: Internet
Author: User
Use the Curl Command to view the request response time method Curl Command to view the request response time

# curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}"\n"https://www.php1.cn0.014::0.015::0.018::0.019::1516256.00

-O: write the html and js returned by curl to the spam recycle bin [/dev/null]

-S: remove all statuses

-W: write rt in the following format

Time_namelookup: the time when the DNS resolution domain name is www.php1.cn

Time_commect: the time when the client and server establish a TCP connection

Time_starttransfer: the time when the client sends a request to the web server to respond to the first byte

Time_total: the time when the client sends a request to the web server to send the corresponding data of the club.

Speed_download: the speed unit is byte/s next week.

The above command and returned results can be understood as follows:

0.014: the time unit for DNS resolution www.php1.cn is s.

0.015: the client sends a request to establish TCP time in c/s, which includes the DNS resolution time.

0.018: the time when the client sends a request, and the time when the first byte of the response is sent by s, including the previous two times.

0.019: the client sends a request, sends all the response data to the client in seconds, and closes the connect time.

1516256.00: data download speed

The time when TCP is established to connect to the server and the first byte of the client is returned: 0.018 s-0.015 s = 0.003 s

The time when the server sends the response data to the client: 0.019 s-0.018 = 0.01 s

The above is the content of the request response time method by using the Curl Command. For more information, see PHP Chinese network (www.php1.cn )!

Related articles:

Generate curl Command line in PHP on the server

Linux curl Command

Generate curl Command line in PHP on the server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.