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 <[EMAIL PROTECTED]> wrote:
> Thanks Praveen. Does anyone else have advice on the parent of the throughput 
> controllers being a RandomController? -Bruce
>
> Praveen Kallakuri <[EMAIL PROTECTED]> 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]

Reply via email to