You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2006/04/30 23:18:35 UTC
svn commit: r398440 -
/jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/threads/JMeterThread.java
Author: sebb
Date: Sun Apr 30 14:18:34 2006
New Revision: 398440
URL: http://svn.apache.org/viewcvs?rev=398440&view=rev
Log:
Move thread count increment to after startup delay
Set up thread group in JMeterContext
Modified:
jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/threads/JMeterThread.java
Modified: jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/threads/JMeterThread.java
URL: http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/threads/JMeterThread.java?rev=398440&r1=398439&r2=398440&view=diff
==============================================================================
--- jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/threads/JMeterThread.java (original)
+++ jakarta/jmeter/branches/rel-2-1/src/core/org/apache/jmeter/threads/JMeterThread.java Sun Apr 30 14:18:34 2006
@@ -49,7 +49,6 @@
* The JMeter interface to the sampling process, allowing JMeter to see the
* timing, add listeners for sampling events and to stop the sampling process.
*
- * @version $Revision$ Last updated: $Date$
*/
public class JMeterThread implements Runnable, java.io.Serializable {
private static final Logger log = LoggingManager.getLoggerForClass();
@@ -307,13 +306,12 @@
*
*/
protected void initRun() {
- JMeterContextService.incrNumberOfThreads();
- threadGroup.incrNumberOfThreads();
threadContext = JMeterContextService.getContext();
threadContext.setVariables(threadVars);
threadContext.setThreadNum(getThreadNum());
threadContext.getVariables().put(LAST_SAMPLE_OK, "true");
threadContext.setThread(this);
+ threadContext.setThreadGroup(threadGroup);
testTree.traverse(compiler);
// listeners = controller.getListeners();
if (scheduler) {
@@ -322,6 +320,8 @@
}
rampUpDelay();
log.info("Thread " + Thread.currentThread().getName() + " started");
+ JMeterContextService.incrNumberOfThreads();
+ threadGroup.incrNumberOfThreads();
/*
* Setting SamplingStarted before the contollers are initialised allows
* them to access the running values of functions and variables (however
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org