Apache JMeter
2.0.1.20050615

org.apache.jmeter.timers
Class ConstantThroughputTimer

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.testbeans.TestBean
          extended byorg.apache.jmeter.timers.ConstantThroughputTimer
All Implemented Interfaces:
Cloneable, Serializable, TestElement, TestListener, Timer

public class ConstantThroughputTimer
extends TestBean
implements Timer, TestListener

This class implements a constant throughput timer. A Constant Throughtput Timer paces the samplers under it's influence so that the total number of samples per unit of time approaches a given constant as much as possible.

Version:
$Id: ConstantThroughputTimer.java,v 1.14.2.2 2004/10/13 00:38:39 sebb Exp $
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
ConstantThroughputTimer()
          Constructor for a non-configured ConstantThroughputTimer.
 
Method Summary
 long delay()
          Retrieve the delay to use during test execution.
 double getThroughput()
          Gets the configured desired throughput.
 void setThroughput(double throughput)
          Sets the desired throughput.
 void testEnded()
          Called once for all threads after the end of a test
 void testEnded(String host)
           
 void testIterationStart(LoopIterationEvent event)
          Each time through a Thread Group's test script, an iteration event is fired.
 void testStarted()
          Get the timer ready to compute delays for a new test.
 void testStarted(String host)
           
 String toString()
          Provide a description of this timer class.
 
Methods inherited from class org.apache.jmeter.testbeans.TestBean
addProperty, addTestElement, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, prepare, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
canRemove, getThreadContext, getThreadName, setThreadContext, setThreadName, threadFinished, threadStarted
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConstantThroughputTimer

public ConstantThroughputTimer()
Constructor for a non-configured ConstantThroughputTimer.

Method Detail

setThroughput

public void setThroughput(double throughput)
Sets the desired throughput.

Parameters:
throughput - Desired sampling rate, in samples per minute.

getThroughput

public double getThroughput()
Gets the configured desired throughput.

Returns:
the rate at which samples should occur, in samples per minute.

delay

public long delay()
Retrieve the delay to use during test execution.

Specified by:
delay in interface Timer
Returns:
the computed delay value.
See Also:
Timer.delay()

toString

public String toString()
Provide a description of this timer class. TODO: Is this ever used? I can't remember where. Remove if it isn't -- TODO: or obtain text from bean's displayName or shortDescription.

Returns:
the description of this timer class.

testStarted

public void testStarted()
Get the timer ready to compute delays for a new test.

Specified by:
testStarted in interface TestListener
See Also:
TestListener.testStarted()

testEnded

public void testEnded()
Description copied from interface: TestListener
Called once for all threads after the end of a test

Specified by:
testEnded in interface TestListener
See Also:
StandardJMeterEngine.stopTest()

testStarted

public void testStarted(String host)
Specified by:
testStarted in interface TestListener

testEnded

public void testEnded(String host)
Specified by:
testEnded in interface TestListener

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Description copied from interface: TestListener
Each time through a Thread Group's test script, an iteration event is fired.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

Apache JMeter
2.0.1.20050615

Copyright © 1998-2005 Apache Software Foundation. All Rights Reserved.