On Wed, 2011-10-26 at 01:51 +0100, sebb wrote:
> Is there an easy way to obtain the socket connection that was used for
> a request?
> 
> It would be useful in JMeter to be able to determine when connections
> are being reused and when not.
> I had in mind to optionally add the connection id (e.g. its system
> hash code) to the sampler data.
> 

Each connection pool entry in the connection pool has an id unique for
the life span of that pool. It is a simple long increment but that
probably should be enough. You might want to leverage that id.

The best way to collect data about connection re-use would likely be
through a custom ConnectionReuseStrategy implementation. The custom
strategy could make use of additional data from the execution context
(HttpContext) and update it as required.

Hope this helps

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to