Reminder of how awesome curl command is. Not only it supports http2 or http2 without TLS, but it also let's you measure how long various aspects of request are taking.

And bonus: you can custom format the output of measurements.

To start with, let's create file: cfmt.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
         time_total:  %{time_total}\n

With that in place, we can do:

curl -v -XGET \
-H "Content-Type: application/json" \
-w "@cfmt.txt" -o /dev/null \

and as a result we get something like:

* Connection #0 to host localhost left intact
    time_namelookup:  0.001798
       time_connect:  0.002079
    time_appconnect:  0.000000
   time_pretransfer:  0.002152
      time_redirect:  0.000000
 time_starttransfer:  0.004829
         time_total:  0.004906

Results are in seconds, and explanations on what each field represents can be found here:

Happy curl-ing,