You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by sebb <se...@gmail.com> on 2011/04/08 21:42:31 UTC
HttpConnectionMetrics - header and total size
In JMeter, we would like to be able to calculate the size of an
HttpResponse before Gzip and chunk decoding, so we're looking at using
HttpConnectionMetrics.
AFAICT, the metrics object can only be obtained after obtaining the
HttpResponse, i.e. after calling HttpClient#execute().
Now it looks as though getReceivedBytesCount() at this point will
include all the headers, but no content - is that guaranteed?
This would be very useful if that is the case.
Calling getReceivedBytesCount() after fully processing the content
shows the total size of the response in bytes, which is another metric
we want.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: HttpConnectionMetrics - header and total size
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2011-04-08 at 20:42 +0100, sebb wrote:
> In JMeter, we would like to be able to calculate the size of an
> HttpResponse before Gzip and chunk decoding, so we're looking at using
> HttpConnectionMetrics.
>
> AFAICT, the metrics object can only be obtained after obtaining the
> HttpResponse, i.e. after calling HttpClient#execute().
>
Yes, as long as you do not want to mess with a custom
HttpRequestDirector implementation
> Now it looks as though getReceivedBytesCount() at this point will
> include all the headers, but no content - is that guaranteed?
Yes, as long as there are no protocol interceptors in the protocol
processing chain that act on response content.
Oleg
> This would be very useful if that is the case.
>
> Calling getReceivedBytesCount() after fully processing the content
> shows the total size of the response in bytes, which is another metric
> we want.
>
> ---------------------------------------------------------------------
> 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