curl is a powerful tool help us send request to a website, for example:
Today, I will tech you guys how to get response time with curl, first we need add -w or –write-out option and we need to know total time, full command likes below:
Now total response time will append to end, but response time looks like response content, it’s ok, let’s add some options.
-s will use silent mode, you will not see progress meter or error message, -o can assign output location, for this case I don’t need save any log so I assign output to /dev/null, \n just break line.
If you need save result to a log file, just assign path and file name.
Please let me know if you have any question, thanks!