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: Connection metrics with Http Client/Core
Date Sun, 23 Nov 2008 13:55:16 GMT
Chris Lowe wrote:
> Hello,
> 
> I'd like to use HttpClient 4.0b1 and HttpCore 4.0b3 to create a stress test
> application from which I need to get the following stats:
> 
> Connection hand shake time;
> Time to first byte sent/recevied;
> Time to last byte received;
> Overall connection metrics - total bytes sent and received from all
> connections.
> 
> Regarding overall metrics, I've seen
> DefaultHttpClientConnection.getMetrics() but I cannot see how I can access
> this information through something like ThreadSafeClientConnManager.
> 
> Could anyone offer some pointers as to how I might derive these stats?
> 
> Cheers,
> 
> Chris.
> 


Hi Chris

You should add a custom protocol interceptor, which would be able to get 
hold of the underlying connection from the execution context

Here is an example how one can extend HttpClient capabilities by adding 
custom protocol interceptors:

http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/module-client/src/examples/org/apache/http/examples/client/ClientGZipContentCompression.java

Hope this helps

Oleg

---------------------------------------------------------------------
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