Yes, it would make sense to keep the context somewhere that can be accessed easily. The solution you propose sounds good. Maybe we should make that part of the TestElement interface (and of course implement it in the AbstractTestElement).
BTW, what's the mechanism used by the engine to decide which elements need to be cloned per thread and which don't (I'm assuming listeners don't, since they gather data from all threads).
-- Salut,
Jordi.
BAZLEY, Sebastian wrote:
All the Samplers (and indeed most/all other test elements) have individual instances for each test thread (plus one or two others).
At the moment, they the JMeter context service to access properties specific to the thread, but this requires obtaining the thread name and looking up the appropriate context, which has to be done by each sampler at least once. Getting the thread name can be expensive.
It seems to me that it might be sensible to set up a reference to the context (and perhaps some other items) in the test startup code - perhaps store it in the AbstractTest element? Samplers would then be able to access the properties directly.
The design of JMeter is such that an instance of a Sampler can only be called by one thread - let's use this ...
Thoughts?
S.
___________________________________________________________________________
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted. ___________________________________________________________________________
--------------------------------------------------------------------- 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]
