cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Metrics on server execution time and transfer time

From: Murugaprabu Marimuthu <murugaprabum_at_gmail.com>
Date: Wed, 4 May 2011 09:23:28 +0530

On 04-May-2011, at 2:20 AM, Daniel Stenberg wrote:

> On Tue, 3 May 2011, Murugaprabu Marimuthu wrote:
>
>> I am using curl to send a very long POST request to a server. I want to measure the time curl takes to send the HTTP request
>
> CURLINFO_PRETRANSFER_TIME is the time all the way until _just before_ libcurl sends its HTTP request.
>
> CURLINFO_STARTTRANSFER_TIME is the time all the way until the first byte has been received by libcurl.
>
>> the server execution time and the time spent in receiving reply from the server. How do I get these metrics from curl.
>
> It seems like the delta between those two times is what you're asking for.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html

The delta between CURLINFO_PRETRANSFER_TIME and CURLINFO_STARTTRANSFER_TIME gives the sum of the time spent by the client in sending the HTTP request and the the time server spends in calculating a result. What I want is the time spent by the client to send the HTTP request seperately and the time server spends in calculating a result seperately. Is there a way to find out from curl that a HTTP request has been sent and now the client is waiting for a reply.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-04