You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by George Pitich <ge...@yahoo.com> on 2010/04/08 08:15:28 UTC

change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a thread group during runtime? For example, I'd like to start test cases with 10 threads running for 1 min and than add (without stopping jmeter) another 10 threads (now 20 threads are running) and finally after 2 mins, I'd like to add another 20 threads and run the test case (now with 40 threads) for the next 3 mins (the idea is to add the load progressively). If scripting is required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.

Re: change # of threads in a thread group during runtime

Posted by sebb <se...@gmail.com>.
On 08/04/2010, George Pitich <ge...@yahoo.com> wrote:
> Hi,
>
>  I would like to know whether it is possible to change # of threads in a thread group during runtime? For example, I'd like to start test cases with 10 threads running for 1 min and than add (without stopping jmeter) another 10 threads (now 20 threads are running) and finally after 2 mins, I'd like to add another 20 threads and run the test case (now with 40 threads) for the next 3 mins (the idea is to add the load progressively). If scripting is required i can use groovy as I managed to run it with BSF sampler.
>

You can use a long ramp-up time to start the threads gradually, but
they won't start in sets of 10.

If you need that functionality, then one way to do it would be to have
a once-only Controller at the start of the thread. Add a Test Action
Sampler as its child with a wait that depends on the thread number,
such that threads 1-10 wait 0 seconds, 2-20 wait 60 seconds etc.

The wait would be something like:

((int)threadNum / 10) * 60000

You can do this using standard JMeter functions, see:

http://jakarta.apache.org/jmeter/usermanual/functions.html

Or you could use a BSF Sampler that paused for the requisite time, and
did not return a value (to avoid generating a sample). Or use a BSF
Timer as a child of the Test Action Sampler (Timers only work if there
is a sampler to act on).

TMTOWTDI as the Perl community has it.

>  Many Thanks,
>
> g.
>
>
>
>
>       __________________________________________________________________
>  Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
>  http://ca.toolbar.yahoo.com.

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


RE: change # of threads in a thread group during runtime

Posted by roywoco <ro...@travelex.com>.
Right. After I use the nightly build and put it into lib/ext, iit works.
Thanks.

Roy


Make note that those Stepping Thread Group works currently only with nagtly
builds. Also the directory for JMeterPlugins.jar is lib/ext, not just lib.

Do you use nightly build and lib/ext?

С уважением, 

Андрей Похилько



-- 
View this message in context: http://old.nabble.com/change---of-threads-in-a-thread-group-during-runtime-tp28174533p28252426.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: change # of threads in a thread group during runtime

Posted by Andrey Pohilko <ap...@fininfor.ru>.
Make note that those Stepping Thread Group works currently only with nagtly
builds. Also the directory for JMeterPlugins.jar is lib/ext, not just lib.

Do you use nightly build and lib/ext?

С уважением, 

Андрей Похилько

-----Original Message-----
From: roywoco [mailto:roy.chan@travelex.com] 
Sent: Wednesday, April 14, 2010 7:21 PM
To: jmeter-user@jakarta.apache.org
Subject: RE: change # of threads in a thread group during runtime


I tried to use the plugin but in vain. I save a copy of downloaded
"JMeterPlugins.jar" in lib and restart jmeter. However, no "Stepping Thread
Group" could be seen under "Add" option.

Could anyone help please?

Roy


I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько


-- 
View this message in context:
http://old.nabble.com/change---of-threads-in-a-thread-group-during-runtime-t
p28174533p28244099.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: change # of threads in a thread group during runtime

Posted by roywoco <ro...@travelex.com>.
I tried to use the plugin but in vain. I save a copy of downloaded
"JMeterPlugins.jar" in lib and restart jmeter. However, no "Stepping Thread
Group" could be seen under "Add" option.

Could anyone help please?

Roy


I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько


-- 
View this message in context: http://old.nabble.com/change---of-threads-in-a-thread-group-during-runtime-tp28174533p28244099.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: jmeter plugin for Stepping Thread Group

Posted by Viswanathan Arunachalam <v....@auckland.ac.nz>.
Thanks for response Andrey but this patch does not work 

Regards,
Applications QA Analyst 
The University of Auckland, New Zealand|Te Whare Wananga o Tamaki Makaurau, Aotearoa, T: +64 9 923 5264   : v.arunachalam@auckland.ac.nz  
"Om Sakti Amman Vinayaka Muruga Sastha Tunai"




-----Original Message-----
From: Andrey Pohilko [mailto:apc@fininfor.ru] 
Sent: Sunday, 6 June 2010 9:45 a.m.
To: 'JMeter Users List'
Subject: RE: jmeter plugin for Stepping Thread Group
Importance: High

Hello!
Stepping Thread Group has Wiki page at
http://code.google.com/p/jmeter-plugins/wiki/SteppingThreadGroup

С уважением, 

Андрей Похилько


-----Original Message-----
From: Viswanathan Arunachalam [mailto:v.arunachalam@auckland.ac.nz] 
Sent: Thursday, June 03, 2010 10:08 AM
To: JMeter Users List; apc@fininfor.ru
Subject: jmeter plugin for Stepping Thread Group

Hi guys where can i find info about the jmeter plugin for Stepping Thread
Group






-----Original Message-----
From: Sonam Chauhan [mailto:sonam.chauhan@ce.com.au] 
Sent: Thursday, 8 April 2010 6:56 p.m.
To: JMeter Users List; apc@fininfor.ru
Subject: RE: change # of threads in a thread group during runtime
Importance: High

I use multiple thread groups for this. 

In the second and third thread groups, I use the 'Java Request' sampler, and
set Classname = 'Sleep Test' to force the threads to start after an
appropriate delay. The only action in these thread groups is a module
controller that calls a set of actions in the first thread group. 



-----Original Message-----
From: Andrey Pohilko [mailto:apc@fininfor.ru] 
Sent: Thursday, 8 April 2010 4:21 PM
To: 'JMeter Users List'
Subject: RE: change # of threads in a thread group during runtime

I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько

-----Original Message-----
From: George Pitich [mailto:george_pitich@yahoo.com] 
Sent: Thursday, April 08, 2010 10:15 AM
To: jmeter-user@jakarta.apache.org
Subject: change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a
thread group during runtime? For example, I'd like to start test cases with
10 threads running for 1 min and than add (without stopping jmeter) another
10 threads (now 20 threads are running) and finally after 2 mins, I'd like
to add another 20 threads and run the test case (now with 40 threads) for
the next 3 mins (the idea is to add the load progressively). If scripting is
required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


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






The information contained in this email and any attached files are strictly
private and confidential. This email should be read by the intended
addressee
only. If the recipient of this message is not the intended addressee, please
call Corporate Express Australia Limited on +61 2 9335 0555 or Corporate
Express
New Zealand Limited on +64 9 271 7600 and promptly delete this email and any
attachments. The intended recipient of this email may only use, reproduce,
disclose or distribute the information contained in this email and any
attached
files with Corporate Express' permission. If you are not the intended
addressee,
you are strictly prohibited from using, reproducing, disclosing or
distributing
the information contained in this email and any attached files. Corporate
Express advises that this email and any attached files should be scanned to
detect viruses. Corporate Express accepts no liability for loss or damage
(whether caused by negligence or not) resulting from the use of any attached
files.

---------------------------------------------------------------------
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


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


RE: jmeter plugin for Stepping Thread Group

Posted by Andrey Pohilko <ap...@fininfor.ru>.
Hello!
Stepping Thread Group has Wiki page at
http://code.google.com/p/jmeter-plugins/wiki/SteppingThreadGroup

С уважением, 

Андрей Похилько


-----Original Message-----
From: Viswanathan Arunachalam [mailto:v.arunachalam@auckland.ac.nz] 
Sent: Thursday, June 03, 2010 10:08 AM
To: JMeter Users List; apc@fininfor.ru
Subject: jmeter plugin for Stepping Thread Group

Hi guys where can i find info about the jmeter plugin for Stepping Thread
Group






-----Original Message-----
From: Sonam Chauhan [mailto:sonam.chauhan@ce.com.au] 
Sent: Thursday, 8 April 2010 6:56 p.m.
To: JMeter Users List; apc@fininfor.ru
Subject: RE: change # of threads in a thread group during runtime
Importance: High

I use multiple thread groups for this. 

In the second and third thread groups, I use the 'Java Request' sampler, and
set Classname = 'Sleep Test' to force the threads to start after an
appropriate delay. The only action in these thread groups is a module
controller that calls a set of actions in the first thread group. 



-----Original Message-----
From: Andrey Pohilko [mailto:apc@fininfor.ru] 
Sent: Thursday, 8 April 2010 4:21 PM
To: 'JMeter Users List'
Subject: RE: change # of threads in a thread group during runtime

I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько

-----Original Message-----
From: George Pitich [mailto:george_pitich@yahoo.com] 
Sent: Thursday, April 08, 2010 10:15 AM
To: jmeter-user@jakarta.apache.org
Subject: change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a
thread group during runtime? For example, I'd like to start test cases with
10 threads running for 1 min and than add (without stopping jmeter) another
10 threads (now 20 threads are running) and finally after 2 mins, I'd like
to add another 20 threads and run the test case (now with 40 threads) for
the next 3 mins (the idea is to add the load progressively). If scripting is
required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


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






The information contained in this email and any attached files are strictly
private and confidential. This email should be read by the intended
addressee
only. If the recipient of this message is not the intended addressee, please
call Corporate Express Australia Limited on +61 2 9335 0555 or Corporate
Express
New Zealand Limited on +64 9 271 7600 and promptly delete this email and any
attachments. The intended recipient of this email may only use, reproduce,
disclose or distribute the information contained in this email and any
attached
files with Corporate Express' permission. If you are not the intended
addressee,
you are strictly prohibited from using, reproducing, disclosing or
distributing
the information contained in this email and any attached files. Corporate
Express advises that this email and any attached files should be scanned to
detect viruses. Corporate Express accepts no liability for loss or damage
(whether caused by negligence or not) resulting from the use of any attached
files.

---------------------------------------------------------------------
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


jmeter plugin for Stepping Thread Group

Posted by Viswanathan Arunachalam <v....@auckland.ac.nz>.
Hi guys where can i find info about the jmeter plugin for Stepping Thread Group






-----Original Message-----
From: Sonam Chauhan [mailto:sonam.chauhan@ce.com.au] 
Sent: Thursday, 8 April 2010 6:56 p.m.
To: JMeter Users List; apc@fininfor.ru
Subject: RE: change # of threads in a thread group during runtime
Importance: High

I use multiple thread groups for this. 

In the second and third thread groups, I use the 'Java Request' sampler, and set Classname = 'Sleep Test' to force the threads to start after an appropriate delay. The only action in these thread groups is a module controller that calls a set of actions in the first thread group. 



-----Original Message-----
From: Andrey Pohilko [mailto:apc@fininfor.ru] 
Sent: Thursday, 8 April 2010 4:21 PM
To: 'JMeter Users List'
Subject: RE: change # of threads in a thread group during runtime

I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько

-----Original Message-----
From: George Pitich [mailto:george_pitich@yahoo.com] 
Sent: Thursday, April 08, 2010 10:15 AM
To: jmeter-user@jakarta.apache.org
Subject: change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a
thread group during runtime? For example, I'd like to start test cases with
10 threads running for 1 min and than add (without stopping jmeter) another
10 threads (now 20 threads are running) and finally after 2 mins, I'd like
to add another 20 threads and run the test case (now with 40 threads) for
the next 3 mins (the idea is to add the load progressively). If scripting is
required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


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






The information contained in this email and any attached files are strictly
private and confidential. This email should be read by the intended addressee
only. If the recipient of this message is not the intended addressee, please
call Corporate Express Australia Limited on +61 2 9335 0555 or Corporate Express
New Zealand Limited on +64 9 271 7600 and promptly delete this email and any
attachments. The intended recipient of this email may only use, reproduce,
disclose or distribute the information contained in this email and any attached
files with Corporate Express' permission. If you are not the intended addressee,
you are strictly prohibited from using, reproducing, disclosing or distributing
the information contained in this email and any attached files. Corporate
Express advises that this email and any attached files should be scanned to
detect viruses. Corporate Express accepts no liability for loss or damage
(whether caused by negligence or not) resulting from the use of any attached
files.

---------------------------------------------------------------------
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: change # of threads in a thread group during runtime

Posted by Sonam Chauhan <so...@ce.com.au>.
I use multiple thread groups for this. 

In the second and third thread groups, I use the 'Java Request' sampler, and set Classname = 'Sleep Test' to force the threads to start after an appropriate delay. The only action in these thread groups is a module controller that calls a set of actions in the first thread group. 



-----Original Message-----
From: Andrey Pohilko [mailto:apc@fininfor.ru] 
Sent: Thursday, 8 April 2010 4:21 PM
To: 'JMeter Users List'
Subject: RE: change # of threads in a thread group during runtime

I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько

-----Original Message-----
From: George Pitich [mailto:george_pitich@yahoo.com] 
Sent: Thursday, April 08, 2010 10:15 AM
To: jmeter-user@jakarta.apache.org
Subject: change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a
thread group during runtime? For example, I'd like to start test cases with
10 threads running for 1 min and than add (without stopping jmeter) another
10 threads (now 20 threads are running) and finally after 2 mins, I'd like
to add another 20 threads and run the test case (now with 40 threads) for
the next 3 mins (the idea is to add the load progressively). If scripting is
required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


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






The information contained in this email and any attached files are strictly
private and confidential. This email should be read by the intended addressee
only. If the recipient of this message is not the intended addressee, please
call Corporate Express Australia Limited on +61 2 9335 0555 or Corporate Express
New Zealand Limited on +64 9 271 7600 and promptly delete this email and any
attachments. The intended recipient of this email may only use, reproduce,
disclose or distribute the information contained in this email and any attached
files with Corporate Express' permission. If you are not the intended addressee,
you are strictly prohibited from using, reproducing, disclosing or distributing
the information contained in this email and any attached files. Corporate
Express advises that this email and any attached files should be scanned to
detect viruses. Corporate Express accepts no liability for loss or damage
(whether caused by negligence or not) resulting from the use of any attached
files.

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


RE: change # of threads in a thread group during runtime

Posted by George Pitich <ge...@yahoo.com>.
Many Thanks Andrey, I'll give it a shot.

Спасибо,
g.

--- On Wed, 4/7/10, Andrey Pohilko <ap...@fininfor.ru> wrote:

From: Andrey Pohilko <ap...@fininfor.ru>
Subject: RE: change # of threads in a thread group during runtime
To: "'JMeter Users List'" <jm...@jakarta.apache.org>
Received: Wednesday, April 7, 2010, 11:21 PM

I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько

-----Original Message-----
From: George Pitich [mailto:george_pitich@yahoo.com] 
Sent: Thursday, April 08, 2010 10:15 AM
To: jmeter-user@jakarta.apache.org
Subject: change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a
thread group during runtime? For example, I'd like to start test cases with
10 threads running for 1 min and than add (without stopping jmeter) another
10 threads (now 20 threads are running) and finally after 2 mins, I'd like
to add another 20 threads and run the test case (now with 40 threads) for
the next 3 mins (the idea is to add the load progressively). If scripting is
required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


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




      __________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier.  Optimized for Yahoo!  Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/

RE: change # of threads in a thread group during runtime

Posted by Andrey Pohilko <ap...@fininfor.ru>.
I had the same task and wrote Stepping Thread Group for this. It is
awailable with latest nightly build +
http://code.google.com/p/jmeter-plugins/ built from sources. 

 
С уважением,
Андрей Похилько

-----Original Message-----
From: George Pitich [mailto:george_pitich@yahoo.com] 
Sent: Thursday, April 08, 2010 10:15 AM
To: jmeter-user@jakarta.apache.org
Subject: change # of threads in a thread group during runtime

Hi,

I would like to know whether it is possible to change # of threads in a
thread group during runtime? For example, I'd like to start test cases with
10 threads running for 1 min and than add (without stopping jmeter) another
10 threads (now 20 threads are running) and finally after 2 mins, I'd like
to add another 20 threads and run the test case (now with 40 threads) for
the next 3 mins (the idea is to add the load progressively). If scripting is
required i can use groovy as I managed to run it with BSF sampler.

Many Thanks,
g.



      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
favourite sites. Download it now
http://ca.toolbar.yahoo.com.


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