You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by thanh nguyen <ma...@gmail.com> on 2010/10/13 17:25:14 UTC

random think time

Hi all,

I want to put some random think time in my script like this
: ${__jexl(2000+${RANDOMNO} ) }. But it doesn't work. 2000 alone, it  is
working. I wonder why. Is it "cpu efficient" to use the object Gaussian
Random timer or Uniform Random Timer?

Thank you,

Re: random think time

Posted by kiransiri <si...@yahoo.co.in>.
Hi thanh,

are you defined 'RANDOMNO' in the testplan? or it just an random number that
can access any number?

Just replace the line using '${__jexl(2000+${__Random(1,100,)})}' and try.
1,100 is a range that can be any one as per your requirement


Regards,
Sree Kiran
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/random-think-time-tp3210666p3216998.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: random think time

Posted by sebb <se...@gmail.com>.
On 18 October 2010 14:30, thanh nguyen <ma...@gmail.com> wrote:
> Sorry for lack of precision. The random no are defined in the CSV file and
> it's read at the beginning of script. JMeter doesn't create random no at
> runtime.  So I think it's more efficient?

No, because you are using Jexl to do the arithmetic; that will likely
be less efficient.

You could use

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constant_Timer

with a value of

${__longSum(2000,${RANDOMNO})}

Or fix the CSV file so it includes the 2000 offset and use

${RANDOMNO}


But why not drop the CSV file and use

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Uniform_Random_Timer

instead?

That will eliminate the CSV file processing as well as the arithmetic.

>
> Thank you
> thanh
>
> On Mon, Oct 18, 2010 at 6:43 AM, sebb <se...@gmail.com> wrote:
>
>> It is likely to be more efficient to use in-built Timers such as
>> Random and Gaussian.
>>
>> Jexl, Beanshell, Javascript etc. all have to be interpreted first and
>> then executed. Java code has already been interpreted.
>>
>> However whether this makes makes a significant difference to the
>> running of a test is another matter.
>>
>> On 13 October 2010 16:25, thanh nguyen <ma...@gmail.com> wrote:
>> > Hi all,
>> >
>> > I want to put some random think time in my script like this
>> > : ${__jexl(2000+${RANDOMNO} ) }. But it doesn't work. 2000 alone, it  is
>> > working. I wonder why. Is it "cpu efficient" to use the object Gaussian
>> > Random timer or Uniform Random Timer?
>> >
>> > Thank you,
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: random think time

Posted by thanh nguyen <ma...@gmail.com>.
Sorry for lack of precision. The random no are defined in the CSV file and
it's read at the beginning of script. JMeter doesn't create random no at
runtime.  So I think it's more efficient?

Thank you
thanh

On Mon, Oct 18, 2010 at 6:43 AM, sebb <se...@gmail.com> wrote:

> It is likely to be more efficient to use in-built Timers such as
> Random and Gaussian.
>
> Jexl, Beanshell, Javascript etc. all have to be interpreted first and
> then executed. Java code has already been interpreted.
>
> However whether this makes makes a significant difference to the
> running of a test is another matter.
>
> On 13 October 2010 16:25, thanh nguyen <ma...@gmail.com> wrote:
> > Hi all,
> >
> > I want to put some random think time in my script like this
> > : ${__jexl(2000+${RANDOMNO} ) }. But it doesn't work. 2000 alone, it  is
> > working. I wonder why. Is it "cpu efficient" to use the object Gaussian
> > Random timer or Uniform Random Timer?
> >
> > Thank you,
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: random think time

Posted by sebb <se...@gmail.com>.
It is likely to be more efficient to use in-built Timers such as
Random and Gaussian.

Jexl, Beanshell, Javascript etc. all have to be interpreted first and
then executed. Java code has already been interpreted.

However whether this makes makes a significant difference to the
running of a test is another matter.

On 13 October 2010 16:25, thanh nguyen <ma...@gmail.com> wrote:
> Hi all,
>
> I want to put some random think time in my script like this
> : ${__jexl(2000+${RANDOMNO} ) }. But it doesn't work. 2000 alone, it  is
> working. I wonder why. Is it "cpu efficient" to use the object Gaussian
> Random timer or Uniform Random Timer?
>
> Thank you,
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org