I've just been looking at the problem reported in bug 18178 - it appears that a new HTTPSampler is created for each sample in each thread: is this the same cloning that you are talking about below?
If the same instance wer used each time, it could simplify connection re-use ... == [Not sure if this is directly relevant:] At present SampleResult objects seem to be created in each Sampler. Just wondering why this is not done in the main thread that calls the samplers? [Perhaps Samplers can call nested Samplers?] [[Might anyway be able to extract out a bit more of the common initialisation (e.g. setting Thread name) in the constructor?]] -- The opinions expressed herein are my own, and are not necessarily endorsed by my employer ... -----Original Message----- From: Mike Stover [mailto:[EMAIL PROTECTED] Sent: 19 March 2003 16:34 To: [EMAIL PROTECTED] Subject: new methods for TestElement, new Properties I'm going to work on eliminating as much of cloning in JMeter as possible. For my first bit, I'm thinking of adding some new methods to the TestElement interface to allow one to tell a TestElement to preserve it's current state so that it can be recovered at some future point. Thus, when samplers get "layered" with config elements, we won't have to clone the samplers. Instead, the sampler will be made a "Running Version", and the layering can be undone after the sample by calling "recoverRunningVersion". No cloning, just some temporary objects to hold the config elements. Most of it can be implemented in AbstractTestElement, though several TestElements will need their own implementation. Basically, I'm finding that TestElements that hold collections have to be more clever about it. However, I'm also planning on implementing a TestElementProperty interface and making various property objects, ala Oliver's branch, and in the end, the properties will hopefully take on much of the burden of these complications. Any suggestions or questions are welcome. -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 AIM: mstover777 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _________________________________________________________ This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of SchlumbergerSema. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please notify the SchlumbergerSema Helpdesk by telephone on +44 (0) 121 627 5600. _________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
