Use the Curl command to view request response time methods _javascript Tips

Source: Internet
Author: User
Tags curl garbage collection

Curl command to view request Response time

# Curl-o/dev/null-s-W%{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_ Download} "\ n" 
http://www.36nu.com 
0.014::0.015::0.018::0.019::1516256.00

-O: The curl returned HTML, JS write to the garbage collection station [/dev/null]

-S: Remove all States

-W: Write RT in the following format

Time_namelookup:dns resolution of domain name www.36nu.com time

Time to establish a TCP connection time_commect:client and the server side

Time_starttransfer: Making a request from the client; the time of the server responding to the first byte in the Web

Time_total:client a request to the Web server to send all the corresponding data time

Speed_download: Next week speed Unit byte/s

The above command and the return result can be understood in this way:

0.014:dns server resolves the www.36nu.com time unit is s

0.015:client issue request, to C/s to establish TCP time; it includes the time of DNS parsing

0.018:client the request is issued, the time when the first byte of the s response is issued, including the previous 2 time

0.019:client the request; to s sends the response data to the client and closes the connect time

1516256.00: Speed of downloading data

Establish TCP connection to server returns the first byte of client time: 0.018s–0.015s = 0.003s

Time server sends response data to client: 0.019s–0.018 = 0.01s

The above is a small set to the introduction of the use of Curl command to view the request response time method, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.