You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Faulkner, Jeffrey" <je...@IDEXX.com> on 2004/10/03 23:53:00 UTC

Random timer help

I would like to create a simple load test where I create 10 threads in a
thread group which execute 2 http requests each.  I would like to assign
each thread a random time say between 0 and 10 minutes before executing the
consecutive requests.  I've tried adding the two requests to the thread
group and a random timer in all sorts of configurations of hierarchies.
Whatever I try it seems like I get a random time but that it is assigned the
same amount to each thread.  I set the random timer delay to 600000 and the
constant part to 0.  Is it possible someone could draw out this seemingly
simply configuration or suggest something else to try?   

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


Re: Random timer help

Posted by sebb <se...@gmail.com>.
Not sure why it isn't working - maybe there's a bug.

You could try a constant timer with a value obtained from the __Random
function, e.g. use the following:

${__Random(0,600000,VAL)}

There's not much room in the box, but it does work.

If you want to log the values, you can surround the above with:

${__log(     and       )}

[This will log the enclosed value and return the value without changing it.]

You probably know this, but just in case:
Timers are applied to all samplers in scope, and are applied before the sample.
In your case you probably need something like:

Thread Group
  HTTP 1
     Timer (will delay before HTTP 1)
  HTTP 2

[The scope of a Timer is its parent, and all siblings, whether before
or after in the tree]

S.
On Sun, 3 Oct 2004 17:53:00 -0400, Faulkner, Jeffrey
<je...@idexx.com> wrote:
> I would like to create a simple load test where I create 10 threads in a
> thread group which execute 2 http requests each.  I would like to assign
> each thread a random time say between 0 and 10 minutes before executing the
> consecutive requests.  I've tried adding the two requests to the thread
> group and a random timer in all sorts of configurations of hierarchies.
> Whatever I try it seems like I get a random time but that it is assigned the
> same amount to each thread.  I set the random timer delay to 600000 and the
> constant part to 0.  Is it possible someone could draw out this seemingly
> simply configuration or suggest something else to try?
> 
> ---------------------------------------------------------------------
> 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