You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Marc Chiarini (Tufts)" <ma...@tufts.edu> on 2007/10/13 00:42:40 UTC

How to generate delays with a function

Hello folks,

I would like to generate a delay between HTTP requests that follows a 
sinusoidal function, e.g. wait between 0 and 100 ms according to a sine 
wave.  I was thinking of using the __Javascript variable along with a 
constant throughput timer, or a counter preprocessor along with a 
BeanShell timer.  I would greatly appreciate hearing from anyone who has 
done something like this.

Regards,
Marc


Re: How to generate delays with a function

Posted by sebb <se...@gmail.com>.
I don't think the Constant Throughput timer would be suitable.

You can use the Constant Timer with a variable or function to define the wait.

Or the BeanShell timer.

Something to watch out for - functions are single-threaded, so don't
put the wait in a function. However you can put the wait-time
calculation in a function, and use it from a Timer.

Remember that Timers are aggregated and applied before any samplers
which are in scope.

What are you intending to base the sine calculation on? Elapsed time?
Samples? Loops?

S.
On 12/10/2007, Marc Chiarini (Tufts) <ma...@tufts.edu> wrote:
> Hello folks,
>
> I would like to generate a delay between HTTP requests that follows a
> sinusoidal function, e.g. wait between 0 and 100 ms according to a sine
> wave.  I was thinking of using the __Javascript variable along with a
> constant throughput timer, or a counter preprocessor along with a
> BeanShell timer.  I would greatly appreciate hearing from anyone who has
> done something like this.
>
> Regards,
> Marc
>
>
> ---------------------------------------------------------------------
> 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