[httperf] Response Times

Arlitt, Martin martin.arlitt at hp.com
Wed Aug 15 10:57:51 PDT 2007


Hi Rahul

 

The httperf output already provides the average response and transfer
times.

 

Martin

 

________________________________

From: rahul gundecha [mailto:rahoolgundecha at yahoo.co.in] 
Sent: Wednesday, August 15, 2007 10:44 AM
To: Arlitt, Martin; anoop aryal; httperf at napali.hpl.hp.com
Subject: RE: [httperf] Response Times

 

Hi Martin,

How to get average response time?
I guess following figure will give me that. Right ?
basic.call_response_sum / basic.num_responses

Where should I place this code.

thanks & regards,
-Rahul


"Arlitt, Martin" <martin.arlitt at hp.com> wrote:

Hi Anoop

As you know there is currently no option in httperf to enable this, but
it is possible and relatively straightforward to do.

Also, as I'm sure you are aware, httperf distinguishes between the
response time and the transfer time for each reply, so I'll describe how
to record each of these.

You will need to modify two functions in stat/basic.c; recv_start (for
response times) and recv_stop (for transfer times).

static void
recv_start (Event_Type et, Object *obj, Any_Type reg_arg, Any_Type
call_arg)
{
Call *c = (Call *) obj;
Time now;
Time delta; /* add this */

assert (et == EV_CALL_RECV_START && object_is_call (c));

now = timer_now ();

delta = now - c->basic.time_send_start; /* add this */

/* the following two lines print the response time information; */
/* the if statement is optional */
/* the print statement prints the response time and timestamp */
/* modify the print statement to suit your needs */
if (verbose) 
printf("response-time = %-8.3f at %-8.3f\n", delta, now); 

basic.call_response_sum += delta; /* modified */
c->basic.time_recv_start = now;
++basic.num_responses;
}

static void
recv_stop (Event_Type et, Object *obj, Any_Type reg_arg, Any_Type
call_arg)
{
Call *c = (Call *) obj;
int index;
Time now; /* added */
Time delta; /* added */

assert (et == EV_CALL_RECV_STOP && object_is_call (c));
assert (c->basic.time_recv_start > 0);

now = timer_now(); /* added */
delta = now - c->basic.time_recv_start; /* added */

/* as with recv_start, modify this to suit your needs */
if (verbose)
printf("transfer-time = %-8.3f at %-8.3f\n", delta, now);

basic.call_xfer_sum += delta; /* modified */

basic.hdr_bytes_received += c->reply.header_bytes;
basic.reply_bytes_received += c->reply.content_bytes;
basic.footer_bytes_received += c->reply.footer_bytes;

index = (c->reply.status / 100);
assert ((unsigned) index < NELEMS (basic.num_replies));
++basic.num_replies[index];
++num_replies;

++c->conn->basic.num_calls_completed;
}


If you want to print out other information, you'll have to experiment
and test yourself; the above is what I did some years back, and it may
not be particularly useful for what you are trying to do (for example,
it does not record a connection or call identifier with each response or
transfer time, which you may want.

Keep in mind that this can easily generate a lot of data, and adds load
to httperf, so if you are really trying to stress a server, you may
significantly reduce the capacity of each httperf client. In other
words, depending on what you are using this for, you may have to
reevaluate the capacity of your httperf clients.

Martin

> -----Original Message-----
> From: httperf-bounces at napali.hpl.hp.com [mailto:httperf-
> bounces at napali.hpl.hp.com] On Behalf Of anoop aryal
> Sent: Wednesday, August 15, 2007 8:11 AM
> To: httperf at napali.hpl.hp.com
> Subject: [httperf] Response Times
> 
> Hi,
> 
> Is there any way to collect the response times? I've seen that with
> LoadRunner - Wondering if that is possible with httperf.
> 
> Anoop.
> aaryal at foresightint.com
> _______________________________________________
> httperf mailing list
> httperf at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/

_______________________________________________
httperf mailing list
httperf at linux.hpl.hp.com
http://www.hpl.hp.com/hosted/linux/mail-archives/httperf/




 <file:///C:\DOCUME~1\rahool\LOCALS~1\Temp\moz-screenshot.jpg>
<file:///C:\DOCUME~1\rahool\LOCALS~1\Temp\moz-screenshot-1.jpg>
<file:///C:\DOCUME~1\rahool\LOCALS~1\Temp\moz-screenshot-2.jpg>
<http://mail.google.com/mail/?realattid=f_ez7y22zo&attid=0.1&disp=inline
&view=att&th=11146fbd76f18c5f> 
-Rahooooooooooooooool...
exceptions are most common things to happen.....
<http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/03.gif> 

  

________________________________

Why delete messages? Unlimited storage is just a click away.
<http://in.rd.yahoo.com/tagline_mail_1/*http:/help.yahoo.com/l/in/yahoo/
mail/yahoomail/tools/tools-08.html/> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/httperf/attachments/20070815/e4943cb7/attachment.htm


More information about the httperf mailing list