jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris" <hillybi...@gmx.at>
Subject Re: possibility for synchronizing threads/samplers?
Date Mon, 12 Mar 2007 18:05:50 GMT
hi!

want i wanted, was the possibility to run a sampler (e.g. of threadgroup A) 
after a certain sampler (of threadgroup B) finished.
this is important if for example thread A creates some data in our 
webapplication and thread B uses this data.
i did NOT want to activate "Test Plan: select run each thread group 
separately", as we have about 10 thread groups that are running parallely 
(to make test cycle times shorter).

i now found a way to solve the problem with java  (1.5) Semamphores. by a 
beanshell preprocessor (or sampler) i use the aquire-method to enter the 
"critical region", and then release the semaphore with another beanshell 
(post)processor or sampler. it works perfectly.
for managing the semaphores, i use a static HashMap that I implemented in 
JMeterUtils.java.

cheers,
   chris



"Alexander J Turner" <git@cubicalland.com> schrieb im Newsbeitrag 
news:1173369873.5658.39.camel@localhost...
> Chris,
>
> Thanks to that.  Your feedback does not get us much further on thought
> does it?  Do you still have a problem - or is everything OK now?
>
> Best wishes
>
> AJ
>
> On Thu, 2007-03-08 at 17:00 +0100, chris wrote:
>
>> > Normally, ThreadGroup2 will not start until ThreadGroup1 has finished.
>> > As sampler2 is a child of ThreadGroup2 and Sampler1 is a child of
>> > ThreadGroup1, this means that all of the Sampler1 actions will have
>> > finished before any of the Sampler2 actions start.  That would appear 
>> > to
>> > be what you are wanting - so there is some confusion.
>> >
>> > Can you try and explain what you want a little more clearly?
>>
>> all thread groups start at the same time. thats the idea of thread 
>> groups.
>> you can avoid starting all thread groups at the same time, if you enable
>> "select run each thread group separately".
>>
>> cheers,
>>    chris
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>>
>
> -- 
>
> ==========================================
> Hard Core How-To's, Coding Techniques ETC.
> --- http://nerds-central.blogspot.com! ---
> Nerds Central welcomes nerds :-)
> ==========================================
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message