Apache JMeter
1.9

org.apache.jmeter.timers
Class ConstantThroughputTimer

java.lang.Object
  |
  +--org.apache.jmeter.testelement.AbstractTestElement
        |
        +--org.apache.jmeter.timers.ConstantThroughputTimer
All Implemented Interfaces:
Cloneable, Serializable, TestElement, Timer

public class ConstantThroughputTimer
extends AbstractTestElement
implements Timer, Serializable

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.6 2003/04/23 18:52:06 mstover1 Exp $
Author:
Jordi Salvat i Alabart, Scott Eade
See Also:
Serialized Form

Field Summary
static String THROUGHPUT
           
 
Fields inherited from class org.apache.jmeter.testelement.AbstractTestElement
log
 
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
 Object clone()
          Creates a copy of this ConstantThroughputTimer, ready to start calculating delays for new samples.
 long delay()
          Retrieve the delay to use during test execution.
 String getDelay()
          Not implemented.
 double getRange()
          Not implemented.
 long getThroughput()
          Gets the configured desired throughput.
 String getThroughputString()
           
 void setDelay(String delay)
          Not implemented.
 void setRange(double range)
          Not implemented.
 void setThroughput(String throughput)
          Sets the desired throughput.
 String toString()
          Provide a description of this timer class.
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, addTestElement, clear, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, isRunningVersion, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

THROUGHPUT

public static final String THROUGHPUT
See Also:
Constant Field Values
Constructor Detail

ConstantThroughputTimer

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

Method Detail

setThroughput

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

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

setRange

public void setRange(double range)
Not implemented.

Specified by:
setRange in interface Timer
Parameters:
range -

getRange

public double getRange()
Not implemented.

Specified by:
getRange in interface Timer
Returns:
double

setDelay

public void setDelay(String delay)
Not implemented.

Specified by:
setDelay in interface Timer
Parameters:
delay - the delay value (this is a String as it can be set using a variable).

getDelay

public String getDelay()
Not implemented.

Specified by:
getDelay in interface Timer
Returns:
String

getThroughput

public long getThroughput()
Gets the configured desired throughput.

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

getThroughputString

public String getThroughputString()

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.

Overrides:
toString in class Object
Returns:
the description of this timer class.

clone

public Object clone()
Creates a copy of this ConstantThroughputTimer, ready to start calculating delays for new samples. This is in assumption that cloning always happens just before a test starts running.

Specified by:
clone in interface TestElement
Overrides:
clone in class AbstractTestElement
Returns:
a fresh copy of this ConstantThroughputTimer

Apache JMeter
1.9

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