[httperf] Response Times
anoop aryal
aaryal at foresightint.com
Wed Aug 15 15:21:33 PDT 2007
My vote would be to add an a flag such as:
--rt <response-times.csv>
or something along those lines. outputting that on the standard output would
probably not be such a hot idea.
by the *.csv, i actually mean a tab or | seperated file and not the actual csv
nonsense with all kinds of quote escaping issues.
i can definitely help with the coding if that's the one thing that's stopping
it from being implemented..
Anoop Aryal
aaryal at foresightint.com
On Wednesday 15 August 2007 11:37:13 am Arlitt, Martin wrote:
> Hi Anoop
>
> It is certainly possible; the main issues would be adding a separate
> option (rather than relying on --verbose) and determining what a
> generally useful output format would be.
>
> Ted Bullock led the group that released 0.8.1 and 0.9; I'll let him
> comment about the rest of your questions.
>
> Thanks
>
> Martin
>
> > -----Original Message-----
> > From: anoop aryal [mailto:aaryal at foresightint.com]
> > Sent: Wednesday, August 15, 2007 9:31 AM
> > To: Arlitt, Martin
> > Subject: Re: [httperf] Response Times
> >
> >
> > Thanks Martin. I'll try it out. I typically use multiple clients to do
>
> the
>
> > tests so the added load on httperf might just mean adding a few more
> > clients
> > which should not be a problem.
> >
> > Any chance that something like that making into the core httperf?
> >
> > Is there somewhere I can read about where httperf is headed? I'm
>
> asking
>
> > because I'm wondering if httperf has any intention of adding features
>
> over
>
> > time or if the intention is to stay lean.
> >
> >
> > Regards,
> >
> > Anoop Aryal
> > aaryal at foresightint.com
> >
> > On Wednesday 15 August 2007 10:40:43 am you 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/
More information about the httperf
mailing list