Blog Archive for June 7, 2019

POSTing with CURL with timings

June 7, 2019

I wanted to do a POST with CURL with a JSON payload and produce some performance stats in the process.

First create this file as curl-format.txt:

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

Next, run the following curl command:

$ curl …