NIghtly r1201923 SyncTimer calls sync.wait outside of a loop which according to : http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#notifyAll%28%29 is wrong. Furthermore, java.util.concurrent.CyclicBarrier would be a better solution to the current implementation and would greatly simplify it. The only remaining pb to this is when GroupSize is set to 0. As cyclicBarrier must be created in test plan start, JMeterContextService.getContext().getThreadGroup().getNumThreads() is not available at this time. Sebb, do you know how to get this information at test plan start ? Thanks
The testStarted() methods are called before any thread groups are created. There may be multiple groups with different counts so it's not possible to provide the thread group count. The ThreadListener interface is called after the thread group has been created, so it might be possible to create the barrier there. The ThreadListener method will need to enure that the barrier is only created once for each Thread Group.
Date: Wed Nov 23 22:33:32 2011 New Revision: 1205639 URL: http://svn.apache.org/viewvc?rev=1205639&view=rev Log: Bug 52183 - SyncTimer could be improved (performance+reliability) Added: jmeter/trunk/src/components/org/apache/jmeter/timers/BarrierWrapper.java (with props) jmeter/trunk/src/components/org/apache/jmeter/timers/SyncTimer.java Modified: jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2646