You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by credible58 <pa...@advance7.com> on 2011/03/26 18:20:39 UTC
Synchronizing Timer - Erratic results after Stop
I am getting erratic behaviour with the Synchronizing Timer after manually
stopping a test with Ctrl-.
It looks very much like the problem reported by Bugzilla report 37705 -
https://issues.apache.org/bugzilla/show_bug.cgi?id=37705
I have added a line of code to the delay() method of SyncTimer.java as
follows:
public long delay() {
synchronized (sync) {
timerCounter[0]++;
final int groupSz = getGroupSize();
final int count = timerCounter[0];
if (
(groupSz == 0 && count >= // count of threads in the thread
group
JMeterContextService.getContext().getThreadGroup().getNumThreads())
||
(groupSz > 0 && count >= groupSz)
) {
sync.notifyAll();
timerCounter[0]=0; // reset counter once we have reached
the limit
} else {
try {
sync.wait();
} catch (InterruptedException e) {
log.warn(e.getLocalizedMessage());
timerCounter[0]=0; // *** Added this line
}
}
}
return 0;
}
This seems to fix the problem.
* Has the earlier fix been lost?
* Am I doing something wrong?
Thanks and regards...Paul
Environment is:
Windows 7 Professional - 32 bit
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
JMeter 2.4 r961953
-----
Paul Offord
Advance7
--
View this message in context: http://jmeter.512774.n5.nabble.com/Synchronizing-Timer-Erratic-results-after-Stop-tp4265689p4265689.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Synchronizing Timer - Erratic results after Stop
Posted by sebb <se...@gmail.com>.
Perhaps you are experiencing
https://issues.apache.org/bugzilla/show_bug.cgi?id=45703
which is not yet in a release.
On 29 March 2011 18:42, credible58 <pa...@advance7.com> wrote:
> Hi apc,
>
> So what's next with this? Should I raise a report on Bugzilla?
>
> Thanks and regards...Paul
>
> -----
> Paul Offord
> Advance7
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Synchronizing-Timer-Erratic-results-after-Stop-tp4265689p4269780.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Synchronizing Timer - Erratic results after Stop
Posted by credible58 <pa...@advance7.com>.
Hi apc,
So what's next with this? Should I raise a report on Bugzilla?
Thanks and regards...Paul
-----
Paul Offord
Advance7
--
View this message in context: http://jmeter.512774.n5.nabble.com/Synchronizing-Timer-Erratic-results-after-Stop-tp4265689p4269780.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Synchronizing Timer - Erratic results after Stop
Posted by Andrey Pohilko <ap...@apc.kg>.
Hmm, I'd suggest implementing TestListener interface, then reseting TimerState
in testStarted() method...
В сообщении от 26 марта 2011 20:20:39 автор credible58 написал:
> I am getting erratic behaviour with the Synchronizing Timer after manually
> stopping a test with Ctrl-.
>
> It looks very much like the problem reported by Bugzilla report 37705 -
> https://issues.apache.org/bugzilla/show_bug.cgi?id=37705
>
> I have added a line of code to the delay() method of SyncTimer.java as
> follows:
>
> public long delay() {
> synchronized (sync) {
> timerCounter[0]++;
> final int groupSz = getGroupSize();
> final int count = timerCounter[0];
> if (
> (groupSz == 0 && count >= // count of threads in the
> thread group
>
> JMeterContextService.getContext().getThreadGroup().getNumThreads())
>
> (groupSz > 0 && count >= groupSz)
> ) {
> sync.notifyAll();
> timerCounter[0]=0; // reset counter once we have reached
> the limit
> } else {
> try {
> sync.wait();
> } catch (InterruptedException e) {
> log.warn(e.getLocalizedMessage());
>
> timerCounter[0]=0; // *** Added this line
>
> }
> }
> }
> return 0;
> }
>
> This seems to fix the problem.
>
> * Has the earlier fix been lost?
> * Am I doing something wrong?
>
> Thanks and regards...Paul
>
> Environment is:
>
> Windows 7 Professional - 32 bit
> java version "1.6.0_22"
> Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
> Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
> JMeter 2.4 r961953
>
>
> -----
> Paul Offord
> Advance7
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Synchronizing-Timer-Erratic-results-aft
> er-Stop-tp4265689p4265689.html Sent from the JMeter - User mailing list
> archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org