On 13/01/2009, John Coleman <[email protected]> wrote:
> > -----Original Message-----
>  > From: sebb [mailto:[email protected]]
>  > Sent: 12 January 2009 19:43
>  > To: JMeter Users List
>  > Subject: Re: Frequency controller
>  >
>  > On 12/01/2009, John Coleman <[email protected]> wrote:
>  > > Hi,
>  > >
>  > >  In our JMeter test we fire requests to the server every
>  > second in a
>  > > loop. However, every n runs of the loop we want to fire an another
>  > > additional request off.
>  > >
>  > >  At present we do an if controller, but the condition in the if
>  > > controller uses a beanshell reference. This seems to be
>  > very slow and
>  > > so  we only manage to run 20 threads okay, but much more
>  > than that and
>  > > the  requests per second doesn't scale up.
>  >
>  > The If Controller uses Javascript by default - why are you
>  > using BeanShell?
>
>
> We manipulate vars in beanshell to produce a random frequency, and then
>  need to test the vars value in the If condition for a match. Is there a
>  native javascript reference to the vars object found in beanshell?

Yes, see:

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

>
>  >
>  > >  When we remove the if controllers with the beanshell
>  > conditions, then
>  > > the test scales properly.
>  > >
>  > >  Is there 1) a way to create variables that can be accessed
>  > both in
>  > > beanshell and if conditions that is faster than using vars?
>  >
>  > It's more likely to be BeanShell rather than variables that
>  > is causing any slowdown.
>
>
> Agreed.
>
>
>  >
>  > >  Or 2) Must
>  > >  we create our own frequency controller, similar to the throughput
>  > > controller, that will only execute it's children every n runs?
>  >
>  > How is that different from the Throughput Controller?
>
>
> The throughput controller apears to either run for the first n
>  iterations, or the last %age of n iterations. We want to run the child
>  controllers every n iterations.

I see. Now that I look at it again, perhaps the curent behaviour is
not very useful...

>  The envisaged frequency controller would
>  check if the modulus of the iteration number was exactly divisible by
>  the frequency, in order to signal a run of its subordinates.

A simple If Controller should be able to achieve that.

Something like:

$COUNT % modulus == 0

(not tested)

>  In addition
>  we might have a range within which the frequency can vary.


>  Regards,
>
> John
>
>
>  ---------------------------------------------------------------------
>  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