org.apache.jmeter.control

Class ThroughputController

Implemented Interfaces:
Cloneable, Serializable, Controller, LoopIterationListener, Serializable, TestElement, TestListener

public class ThroughputController
extends GenericController
implements Serializable, LoopIterationListener, TestListener

This class represents a controller that can control 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) The current implementation executes the first N samples (BYNUMBER) or the last N% of samples (BYPERCENT).

Field Summary

static int
BYNUMBER
static int
BYPERCENT

Fields inherited from class org.apache.jmeter.control.GenericController

current, subControllersAndSamplers

Fields inherited from interface org.apache.jmeter.testelement.TestElement

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Constructor Summary

ThroughputController()

Method Summary

Object
clone()
String
getMaxThroughput()
protected int
getMaxThroughputAsInt()
String
getPercentThroughput()
protected float
getPercentThroughputAsFloat()
int
getStyle()
boolean
isDone()
boolean
isPerThread()
void
iterationStart(LoopIterationEvent iterEvent)
Sampler
next()
void
setMaxThroughput(String maxThroughput)
void
setMaxThroughput(int maxThroughput)
void
setPerThread(boolean perThread)
void
setPercentThroughput(String percentThroughput)
void
setPercentThroughput(float percentThroughput)
void
setStyle(int style)
void
testEnded()
void
testEnded(String host)
void
testIterationStart(LoopIterationEvent event)
void
testStarted()
void
testStarted(String host)

Methods inherited from class org.apache.jmeter.control.GenericController

addIterationListener, addTestElement, currentReturnedNull, fireIterEvents, fireIterationStart, getCurrentElement, getIterCount, getSubControllers, incrementCurrent, incrementIterCount, initialize, isDone, isFirst, next, nextIsAController, nextIsASampler, nextIsNull, reInitialize, removeCurrentElement, resetCurrent, resetIterCount, setCurrentElement, setDone, setFirst

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Field Details

BYNUMBER

public static final int BYNUMBER
Field Value:
0

BYPERCENT

public static final int BYPERCENT
Field Value:
1

Constructor Details

ThroughputController

public ThroughputController()

Method Details

clone

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

getMaxThroughput

public String getMaxThroughput()

getMaxThroughputAsInt

protected int getMaxThroughputAsInt()

getPercentThroughput

public String getPercentThroughput()

getPercentThroughputAsFloat

protected float getPercentThroughputAsFloat()

getStyle

public int getStyle()

isDone

public boolean isDone()
Specified by:
isDone in interface Controller
Overrides:
isDone in interface GenericController

isPerThread

public boolean isPerThread()

iterationStart

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

next

public Sampler next()
Specified by:
next in interface Controller
Overrides:
next in interface GenericController

setMaxThroughput

public void setMaxThroughput(String maxThroughput)

setMaxThroughput

public void setMaxThroughput(int maxThroughput)

setPerThread

public void setPerThread(boolean perThread)

setPercentThroughput

public void setPercentThroughput(String percentThroughput)

setPercentThroughput

public void setPercentThroughput(float percentThroughput)

setStyle

public void setStyle(int style)

testEnded

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

testEnded

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

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Specified by:
testIterationStart in interface TestListener

testStarted

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

testStarted

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

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