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: Measuring/throttling bandwidth of a request
Date Mon, 28 Jun 2010 11:23:20 GMT
On Fri, 2010-06-25 at 07:42 -0700, Pierre Paour wrote:
> I'm using HTTPComponents 4.1-alpha2 to upload large-ish files from a
> desktop to a server, and I'd like to be able to report to the end-user
> the bandwidth consumed by the application (and projected time to
> completion), as well as optionally throttle the uplink bandwidth used
> by the application (so as not to saturate the user's uplink).
> 
> I've searched for an existing solution, but I couldn't find anything.
> Would you be able to point me in the right direction?
> 
> Thanks,
> 
> Pierre

Pierre

JMeter project has 'slow' Socket class extension that can be used to
simulate slow connections. The trick there is to decorate the
InputStream/OutputStream classes associated with the socket and execute
additional logic such as i/o throttling, statistics gathering, callbacks
for visual feedback, etc before or after the real i/o operation. The
same technique can be used on the HttpEntity level if you are okay with
controlling the i/o streaming of the HTTP body only.

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