You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Jordi Salvat i Alabart <js...@atg.com> on 2002/11/15 12:41:34 UTC

Constant throughput timer

Hi.

I'm attaching the code for a new Timer I've created which allows you to 
put the server under pre-specified load.

I've found this useful when the performance requirement to test against 
is in the lines of "the system should be able to serve X pages per 
minute with latencies lower than Y milliseconds." (Which is probably one 
of the best ways to express performance requirements).

To use it:

- Drop the two attached files in
src/components/org/apache/jmeter/timers/ConstantThroughputTimer.java
src/components/org/apache/jmeter/timers/gui/ConstantThroughputTimerGui.java

- Add the following resources to 
./src/core/org/apache/jmeter/resources/messages.properties (and the 
corresponding translations, of course):
constant_throughput_timer_memo=Add a delay between sampling to attain 
constant throughput
constant_throughput_timer_title=Constant Throughput Timer
constant_throughput_timer_throughput=Thread Throughput (in samples per 
minute):

- Create your test, adding a Constant Throughput Timer to the Thread 
Group. (I've not tested the behaviour of this timer when placed at other 
levels, nor when combined with other timers).

- Run your test. Sampling will happen at the specified rate -- or as 
fast as possible if the system is not fast enough to attain that rate.

Note the rate is for the ensemble of all threads: adding more threads 
will cause each of them to run slower.

One difficulty I've encountered when writing this is that there's no 
method to signal a test component when the test is starting. I've 
assumed that a new timer object is created (or cloned) for every test 
run. The timer seems to behave as expected, so looks like this 
assumption is correct...

Salut,

Jordi.