title: Calculating Server Processing Time With Curl
body: <p>I am getting request timing info with curl using the <code>--write-out</code> option as described <a href="https://josephscott.org/archives/2011/10/timing-details-with-curl/" rel="noreferrer">in this article</a>.</p>
  
  <p>Here is example output from one of my requests:</p>
  
  <pre><code>        time_namelookup:  0.031
             time_connect:  0.328
          time_appconnect:  1.560
         time_pretransfer:  1.560
            time_redirect:  0.000
       time_starttransfer:  1.903
                          ----------
               time_total:  2.075
  </code></pre>
  
  <p>My question is: How can I determine how much time the server took processing the request?  Is the answer:</p>
  
  <pre><code>time_starttransfer - time-connect
  </code></pre>
  
  <p>That is, the time from when the connection was established to when the server starting sending its response?  That seems correct but I want to be sure.</p>
  
  <p>Details about curl timing variables may be found here: <a href="http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html" rel="noreferrer">http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html</a></p>