On Tue, 2006-02-21 at 10:50 +0000, sebb wrote:
> On 20/02/06, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> > On Sun, 2006-02-19 at 02:50 -0800, Travis Bear wrote:
> > > Sorry if this is a newb question.  Web searches have returned no 
> > > satisfactory answers.
> > >
> > >  I'm running a test app with hundreds of threads that each generate HTTP 
> > > requests.  Is there some mechanism that exists to cap the bandwidwitdh 
> > > used by each thread in order to simulate slower connections?
> > >
> > >  If this doesn't exist already, I will have to write something to do it.  
> > > In tis case would there be interest in including this feature in 
> > > HttpClient?
> > >
> > >  Thanks!
> > >
> > >
> > >  -Travis
> > >
> >
> > Travis,
> >
> > HttpClient does not support bandwidth throttling out of the box, however
> > it should not be that difficult to implement a custom socket factory
> > that is bandwidth throttling capable.
> >
> > I believe Sebastian of the JMeter fame has implemented something of that
> > sort for Jakarta JMeter. JMeter dev list should be the right place to
> > ask around
> >
> 
> FYI: I added a "Slow Socket" implementation for use with HttpClient.
> 
> See
> 
> org/apache/jmeter/util/SlowSocket.java
> under src/core
> and
> 
> org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.java
> under
> src/protocol/http

http://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/util/SlowSocket.java
http://svn.apache.org/repos/asf/jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/util/SlowHttpClientSocketFactory.java

> 
> The code is invoked by
> 
> Protocol.registerProtocol(PROTOCOL_HTTP,
>                 new Protocol(PROTOCOL_HTTP,
>                 new SlowHttpClientSocketFactory(cps),
>                 DEFAULT_HTTP_PORT));
> 
> Would there be any interest in adding this to HttpClient, perhaps as a
> contrib item?
> 

There certainly would be some interest in such a contribution

Oleg

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


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

Reply via email to