On Tue, 2008-04-15 at 21:41 +0300, Eugeny N Dzhurinsky wrote:
> On Tue, Apr 15, 2008 at 07:49:12PM +0200, Oleg Kalnichevski wrote:
> > 
> > On Tue, 2008-04-15 at 19:43 +0300, Eugeny N Dzhurinsky wrote:
> > > Hello there!
> > > 
> > > Is there any way to get the bandwidth, used by HttpClient to download
> > > pages?
> > > 
> > > Currently we are using version 3.0.1 of HttpClient, and we had 
> > > implemented the
> > > ProtocolSocketFactory which returns an instance of the custom Socket 
> > > class,
> > > which returns the InputStream which is able to return amount of bytes read
> > > from the content stream. Knowing the amount of bytes and time of 
> > > download, it
> > > is trivial to calculate the bandwidth - however the real bandwidth on the
> > > network interface is about 2 times more than reported by our application.
> > > 
> > > And we are sure there are no other network activity on the interface, and 
> > > our
> > > calculations seems to be right - the amount of downloaded data equals to 
> > > the
> > > amount of data saved to the persisted storage.
> > 
> > It is possible that the remote server is just not able to saturate all
> > available bandwidth.
> 
> Well, it does. For example, our application displays 1 mbit/seconds, but
> pktshow/trafshow displays 2 mbit/seconds of bandwidth usage on the physical
> interface. And we are absolutely sure there are no another application which
> are accessing network, also we are 99.9% sure there are no errors /
> miscalculations in our application - the things are pretty straightforward. 
> So the question for now is - are there any other ways to get the bandwidth
> usage information from HttpClient?

None I know of

>  And is the usage of ProtocolSocketFactory
> the recommended way to get such information?
> 

Yes, it is

Oleg

> Thank you in advance!
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to