hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Requirement in terms of Metrics : Latency
Date Thu, 21 Jan 2016 13:33:37 GMT
On Thu, 2016-01-21 at 13:44 +0100, Philippe Mouawad wrote:
> Hello Oleg,
> Thanks for answer.
> For request it should be ok ,but I am not sure for response as I need time
> to first byte.
> I think I need something just after:
> 
> > response = conn.receiveResponseHeader();
> 

Blocking I/O connections do not actually read message body. They merely
attach the stream to the message entity (this is the reason why one
needs to explicitly release connections in the classic I/O mode). 

So, #execute method execution time will give you the time between
transmission of the entire request message and receipt of the response
head, which is most cases is as good as the time until first response
byte.

Oleg

  

> Regards
> 
> 
> 
> 
> On Mon, Jan 18, 2016 at 10:06 AM, Oleg Kalnichevski <olegk@apache.org>
> wrote:
> 
> > On Sun, 2016-01-17 at 13:32 -0800, Gary Gregory wrote:
> > > I'll let Oleg opine on the right way...
> > >
> > > Gary
> > > On Jan 17, 2016 1:28 PM, "Philippe Mouawad" <philippe.mouawad@gmail.com>
> > > wrote:
> > >
> > > > Hi Gary,
> > > > First I just wanted some confirmation that it's the right way.
> > > > Then I will see if I can provide a patch.
> > > >
> > > > Regards
> > > >
> > > > On Sunday, January 17, 2016, Gary Gregory <garydgregory@gmail.com>
> > wrote:
> > > >
> > > > > Hi Philippe,
> > > > >
> > > > > If you want to speed up the process, I'd recommend you provide a
> > patch on
> > > > > top of trunk.
> > > > >
> > > > > 2c,
> > > > > Gary
> > > > >
> > > > > On Sun, Jan 17, 2016 at 5:33 AM, Philippe Mouawad <
> > pmouawad@apache.org
> > > > > <javascript:;>>
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > > Any feedback on this question ?
> > > > > > Thanks
> > > > > >
> > > > > > On Wed, Jan 13, 2016 at 10:48 PM, Philippe Mouawad <
> > > > pmouawad@apache.org
> > > > > <javascript:;>>
> > > > > > wrote:
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > We have a requirement in JMeter to compute latency in the
most
> > > > accurate
> > > > > > > way:
> > > > > > >
> > > > > > >    - latency being  the time between the start of the request
> > send
> > > > and
> > > > > > >    the first byte receival.
> > > > > > >
> > > > > > > Currently it appears there is an interface called:
> > > > > > >
> > > > > > >    - org.apache.http.HttpConnectionMetrics
> > > > > > >
> > > > > > > implemented by :
> > > > > > >
> > > > > > >    - org.apache.http.impl.HttpConnectionMetricsImpl
> > > > > > >
> > > > > > > It would be nice to enhance to compute this latency within
> > > > > > > HTTPCore/HTTPClient.
> > > > > > >
> > > > > > > Or maybe this already exists.
> > > > > > >
> >
> > What you probably want is to capture the time spent in
> > HttpRequestExecutor#execute.
> >
> >
> > http://hc.apache.org/httpcomponents-core-4.4.x/httpcore/xref/org/apache/http/protocol/HttpRequestExecutor.html#114
> >
> > You can do so by extending the class and decorating the #execute method.
> >
> > Oleg
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> >
> >
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message