|
|||||||
Timing Details With cURL
Время создания: 02.02.2018 11:49
Автор: Joseph Scott
Текстовые метки: curl test time
Раздел: cURL, wget
Запись: Velonski/mytetra-database/master/base/1517554148whmd1hxu00/text.html на raw.githubusercontent.com
|
|||||||
|
|||||||
on’s recent Find the Time to First Byte Using Curl post reminded me about the additional timing details that cURL can provide. cURL supports formatted output for the details of the request ( see the cURL manpage for details, under “-w, –write-out <format>” ). For our purposes we’ll focus just on the timing details that are provided. Step one: create a new file, curl-format.txt, and paste in:
Step two, make a request: curl -w "@curl-format.txt" -o /dev/null -s http://wordpress.com/
What this does:
And here is what you get back:
Jon was looking specifically at time to first byte, which is the time_starttransfer line. The other timing details include DNS lookup, TCP connect, pre-transfer negotiations, redirects (in this case there were none), and of course the total time. The format file for this output provides a reasonable level of flexibility, for instance you could make it CSV formatted for easy parsing. You might want to do that if you were running this as a cron job to track timing details of a specific URL. For details on the other information that cURL can provide using -w check out the cURL manpage . |
|||||||
Так же в этом разделе:
|
|||||||
|
|||||||
|