On 11/03/2008, fernando castano <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
>  I'd need a controller similar to a switch controller, but I need to be
> able to define
> the probability for selecting each of the childre controllers in each
> iteration.  for example,
> if the switch controller has as children c1, c2 and c3 I'd like to be
> able to:
>
> select c1 80% of the times
> select c2 7% of the times
> select c3 13% of the times
>
>  what would be the best way to implement this? beanshell?  any examples
> available?

One way is to use the Switch Controller with a variable condition.

The condition value can be generated as a random number which is then
converted to 0,1,2 in the appropriate proportions. This can be done
with Beanshell or Jexl or Javascript functions.

This has been discussed before a few times; check the mail archives.

> TIA,
>
> fdo
>
> ---------------------------------------------------------------------
> 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