Apache JMeter
2.0.1.20050615

org.apache.jmeter.control
Class ThroughputController

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.control.GenericController
          extended byorg.apache.jmeter.control.ThroughputController
All Implemented Interfaces:
Cloneable, Controller, LoopIterationListener, Serializable, TestElement, TestListener

public class ThroughputController
extends GenericController
implements Serializable, LoopIterationListener, TestListener

This class represents a controller that can controll the number of times that it is executed, either by the total number of times the user wants the controller executed (BYNUMBER) or by the percentage of time it is called (BYPERCENT)

Version:
$Revision: 1.15.2.1 $
Author:
Thad Smith
See Also:
Serialized Form

Nested Class Summary
static class ThroughputController.Test
           
 
Field Summary
static int BYNUMBER
           
static int BYPERCENT
           
 
Fields inherited from class org.apache.jmeter.control.GenericController
current, iterationListeners, subControllersAndSamplers
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
ThroughputController()
           
 
Method Summary
 Object clone()
           
protected  int getExecutions()
           
protected  int getIteration()
           
 String getMaxThroughput()
           
protected  int getMaxThroughputAsInt()
           
 String getPercentThroughput()
           
protected  float getPercentThroughputAsFloat()
           
 int getStyle()
           
 boolean isDone()
          Indicates whether the Controller is done delivering Samplers for the rest of the test.
 boolean isPerThread()
           
 void iterationStart(LoopIterationEvent iterEvent)
           
 Sampler next()
          Delivers the next Sampler.
protected  void setExecutions(int executions)
           
protected  void setIteration(int iteration)
           
 void setMaxThroughput(int maxThroughput)
           
 void setMaxThroughput(String maxThroughput)
           
 void setPercentThroughput(float percentThroughput)
           
 void setPercentThroughput(String percentThroughput)
           
 void setPerThread(boolean perThread)
           
 void setStyle(int style)
           
 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()
          Called just before the start of the test Note that not all the test variables will have been set up at this point.
 void testStarted(String host)
           
 
Methods inherited from class org.apache.jmeter.control.GenericController
addIterationListener, addTestElement, currentReturnedNull, fireIterationStart, fireIterEvents, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, isFirst, nextIsAController, nextIsASampler, nextIsNull, reInitialize, removeCurrentElement, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, canRemove, clear, clearTemporary, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jmeter.testelement.TestElement
canRemove, clear, getProperty, getPropertyAsBoolean, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse
 

Field Detail

BYNUMBER

public static final int BYNUMBER
See Also:
Constant Field Values

BYPERCENT

public static final int BYPERCENT
See Also:
Constant Field Values
Constructor Detail

ThroughputController

public ThroughputController()
Method Detail

setStyle

public void setStyle(int style)

getStyle

public int getStyle()

setPerThread

public void setPerThread(boolean perThread)

isPerThread

public boolean isPerThread()

setMaxThroughput

public void setMaxThroughput(int maxThroughput)

setMaxThroughput

public void setMaxThroughput(String maxThroughput)

getMaxThroughput

public String getMaxThroughput()

getMaxThroughputAsInt

protected int getMaxThroughputAsInt()

setPercentThroughput

public void setPercentThroughput(float percentThroughput)

setPercentThroughput

public void setPercentThroughput(String percentThroughput)

getPercentThroughput

public String getPercentThroughput()

getPercentThroughputAsFloat

protected float getPercentThroughputAsFloat()

setExecutions

protected void setExecutions(int executions)

getExecutions

protected int getExecutions()

setIteration

protected void setIteration(int iteration)

getIteration

protected int getIteration()

next

public Sampler next()
Description copied from interface: Controller
Delivers the next Sampler.

Specified by:
next in interface Controller
Overrides:
next in class GenericController
See Also:
Controller.next()

isDone

public boolean isDone()
Description copied from interface: Controller
Indicates whether the Controller is done delivering Samplers for the rest of the test.

Specified by:
isDone in interface Controller
Overrides:
isDone in class GenericController
See Also:
Controller.isDone()

clone

public Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in class AbstractTestElement

iterationStart

public void iterationStart(LoopIterationEvent iterEvent)
Specified by:
iterationStart in interface LoopIterationListener

testStarted

public void testStarted()
Description copied from interface: TestListener
Called just before the start of the test Note that not all the test variables will have been set up at this point.

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

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.