Attached are the patches for the three files (sorry they are individual
patches, but I made a bunch of other changes that you probably don't want).
I would change the way the new threads are named.  Currently, dyn-n is
appended to the name of the thread from which the
createDynamicJMeterThread() method was called so that I could keep track of
which thread a new thread was spawned from.  I would change this code to
increment the ThreadGroup number and Thread number because when you have
many recursive calls (like I do in my tests) the thread names can get a bit
unwieldy.  Naming the new dynamic threads with ThreadGroup [ThreadGroup
number + 1]-n would allow you keep track of where new threads are launching
from while maintaining a consistent naming convention.

Here is an example of how to use this in a beanshell
sampler/(pre|post)processor:

// get JMeterThread from context
thread = ctx.getThread();
engine = thread.getEngine();

  _vars = new JMeterVariables();
// add some thread specific variables here
  _vars.put( "USER", username );
  _vars.put( "PASS", password );

//launch thread
engine.createDynamicJMeterThread( thread, _vars );

Let me know if you have any questions.
(See attached file: dynamic_threads_thread.patch)(See attached file:
dynamic_threads_contextservice.patch)(See attached file:
dynamic_threads_engine.patch)
Skyler Bingham
[EMAIL PROTECTED]
(602) 957-1650 x1139


                                                                       
             "jsm83"                                                   
             <[EMAIL PROTECTED]                                     
             br>                                                        To
                                       "jmeter-user"                   
             02/22/2007 01:45          <[email protected]>
             PM                                                         cc
                                                                       
                                                                   Subject
             Please respond to         Re: JMeter Adaptive Test Issue  
               "JMeter Users                                           
                   List"                                               
             <[EMAIL PROTECTED]                                         
              rta.apache.org>                                      
                                                                       
                                                                       




Yes. I would like you to sendt it.


Thankx

---------- Cabeçalho original -----------

De: [EMAIL PROTECTED]
Para: "JMeter Users List" [email protected]
Cópia:
Data: Thu, 22 Feb 2007 09:39:02 -0700
Assunto: Re: JMeter Adaptive Test Issue

>
>
>
>
> I was unable to find a way to do what you are attempting with JMeter, so
I
> modified the JMeter 2.2 code to allow me to dynamically create new
threads
> at runtime.  This is done by calling a new method on the
> StandardJMeterEngine class using beanshell.  This patch has not been
added
> to the JMeter build, but I can send it to you if you are interested.
>
> sebb, do you think this functionality would be useful to add to JMeter?
If
> so, I can clean up the patch and submit it.
>
> Skyler Bingham
> [EMAIL PROTECTED]
> (602) 957-1650 x1139
>
>
>

>              "jsm83"

>              <[EMAIL PROTECTED]

>              br>
To
>                                        "jmeter-user"

>              02/22/2007 01:28          <[email protected]>

>              PM
cc
>

>
Subject
>              Please respond to         JMeter Adaptive Test Issue

>                "JMeter Users

>                    List"

>              <[EMAIL PROTECTED]

>               rta.apache.org>

>

>

>
>
>
>
> Hi.
> I need to make an adaptive test on a server.
> The test starts with a simple HTTP request. Depending on the sample time
of
> this request i want to increase the
> load of the test.
> For example:
> I start with 10 thread users. If the sample time is low i want it to
> increase to 30 threads users at runtime.
>
> How could i do that? Should i make a new Threadgroup start at runtime?
How?
>
>
> Thanks.
>
> Juliano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> This e-mail and files transmitted with it are confidential, and are
> intended solely for the use of the individual or entity to whom this
e-mail
> is addressed.  If you are not the intended recipient, or the employee or
> agent responsible to deliver it to the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this
> communication is strictly prohibited.  If you are not one of the named
> recipient(s) or otherwise have reason to believe that you received this
> message in error, please immediately notify [EMAIL PROTECTED]
>  by e-mail, and destroy the original message.  Thank You.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail and files transmitted with it are confidential, and are
intended solely for the use of the individual or entity to whom this e-mail
is addressed.  If you are not the intended recipient, or the employee or
agent responsible to deliver it to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited.  If you are not one of the named
recipient(s) or otherwise have reason to believe that you received this
message in error, please immediately notify [EMAIL PROTECTED]
 by e-mail, and destroy the original message.  Thank You.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to