Functions are shared across threads.

Each occurrence of a function in the test plan is handled by a
separate instance of the function.

S.
On 25/03/06, bgordon <[EMAIL PROTECTED]> wrote:
> If I run many threads, say 20, will the various threads be in lock step? I do 
> want all the threads to use the same random number generator so that the next 
> value is relatively random. I'm concerned that if I have 20 random number 
> generators, and they're all seeded with the current time, they may all have 
> the same seed and generate the same random numbers. Using JMeter's 
> architecture and JavaScript Random() function, will I get 20 instances of the 
> Random() Function (which I don't want)? Or alternatively, how can I 
> indirectly control the seeding by starting each thread with a delay?
>
> Thanks,  Bruce
>
> sebb <[EMAIL PROTECTED]> wrote: Rather than use the IF controller, the Switch 
> Controller can be
> combined with a suitable variable (N).
>
> Just define the variable to have the values 0,1,2 for the relevant
> percentage of the time.
>
> Basic procedure:
>
> r=random integer, 1-100
> N=0 if   0 < r <= 80
> N=1 if 80 < r
>
> This can be done in a JavaScript or BeanShell function.
>
> On 25/03/06, bgordon  wrote:
> > Thanks Praveen. Does anyone else have advice on the parent of the 
> > throughput controllers being a RandomController? -Bruce
> >
> > Praveen Kallakuri
>  wrote: I meant if (rand(0,9) < 8) below.
> >
> > On 3/21/06, Praveen Kallakuri
> >  wrote:
> > >
> > > Not sure if this is the best solution, but you could use an if controller
> > > containing javascript like ... if (rand(0,9) <= 8). Send HTTP Request B 
> > > only
> > > if this evaluates to true and also set a user defined variable to indicate
> > > that this B has been sent. In the next if controller, send A only if the
> > > variable indicates that B has not been sent.
> > >
> > >
> > > On 3/15/06, bgordon  wrote:
> > > >
> > > > Here's a simplified view of what I want
> > > >
> > > >   Aggregate Thread Group
> > > >   -Txn A throughput controller 20%
> > > >   --txn A HTTP Request
> > > >   -Txn B throughput  controller  80%
> > > >   --txn B HTTP Request
> > > >
> > > >   I want A to be run ~20% of the time, and B to be run ~80%. I don't
> > > > want the system to have all threads run A, then all Threads run B- I 
> > > > want
> > > > them to be random, yet work out to the percentages specified.
> > > >
> > > >   What is a good practice for this? I'm unsure if having a parent Random
> > > > Controller will help (and I'm further confused by the difference between
> > > > Random Controller and Random Order Controller).
> > > >
> > > >   Thanks, Bruce
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > >                                                        k.p.
> > >
> >
> >
> >
> > --
> >
> >                                                        k.p.
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> 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]

Reply via email to