public class ResultCollector extends AbstractListenerElement implements SampleListener, Clearable, Serializable, TestStateListener, Remoteable, NoThreadClone
Modifier and Type | Field and Description |
---|---|
static String |
FILENAME |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
Constructor and Description |
---|
ResultCollector()
No-arg constructor.
|
ResultCollector(Summariser summer) |
Modifier and Type | Method and Description |
---|---|
void |
clearData()
Clears the current data of the object.
|
Object |
clone() |
String |
getFilename() |
SampleSaveConfiguration |
getSaveConfig() |
boolean |
isErrorLogging() |
boolean |
isSampleWanted(boolean success)
Decides whether or not to a sample is wanted based on:
- errorOnly - successOnly - sample success Should only be called for single samples. |
static boolean |
isSampleWanted(boolean success,
boolean errorOnly,
boolean successOnly)
Decides whether or not to a sample is wanted based on:
- errorOnly - successOnly - sample success This version is intended to be called by code that loops over many samples; it is cheaper than fetching the settings each time. |
boolean |
isSuccessOnlyLogging() |
void |
loadExistingFile()
Loads an existing sample data (JTL) file.
|
void |
recordStats(TestElement e)
recordStats is used to save statistics generated by visualizers
|
void |
sampleOccurred(SampleEvent event)
When a test result is received, display it and save it.
|
void |
sampleStarted(SampleEvent e)
A sample has started.
|
void |
sampleStopped(SampleEvent e)
A sample has stopped.
|
protected void |
sendToVisualizer(SampleResult r) |
void |
setErrorLogging(boolean errorLogging) |
void |
setFilename(String f)
Sets the filename attribute of the ResultCollector object.
|
void |
setSaveConfig(SampleSaveConfiguration saveConfig) |
void |
setSuccessOnlyLogging(boolean value) |
void |
testEnded()
Called once for all threads after the end of a test.
|
void |
testEnded(String host)
Called once for all threads after the end of a test.
|
void |
testStarted()
Called just before the start of the test from the main engine thread.
|
void |
testStarted(String host)
Called just before the start of the test from the main engine thread.
|
getVisualizer, setListener
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getSearchableTokens, 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
public static final String FILENAME
public ResultCollector()
public ResultCollector(Summariser summer)
public Object clone()
clone
in interface TestElement
clone
in class AbstractListenerElement
public String getFilename()
public boolean isErrorLogging()
public final void setErrorLogging(boolean errorLogging)
public final void setSuccessOnlyLogging(boolean value)
public boolean isSuccessOnlyLogging()
public boolean isSampleWanted(boolean success)
success
- is sample successfulpublic static boolean isSampleWanted(boolean success, boolean errorOnly, boolean successOnly)
success
- status of sampleerrorOnly
- if errors only wantedsuccessOnly
- if success only wantedpublic void setFilename(String f)
f
- the new filename valuepublic void testEnded(String host)
TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
host
- name of hostStandardJMeterEngine.stopTest()
public void testStarted(String host)
TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
host
- name of hostStandardJMeterEngine.run()
public void testEnded()
TestStateListener
Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.
N.B. testStarted() and testEnded() are called from different threads.
testEnded
in interface TestStateListener
StandardJMeterEngine.stopTest()
public void testStarted()
TestStateListener
Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.
N.B. testStarted() and testEnded() are called from different threads.
testStarted
in interface TestStateListener
StandardJMeterEngine.run()
public void loadExistingFile()
public void sampleStarted(SampleEvent e)
SampleListener
sampleStarted
in interface SampleListener
public void sampleStopped(SampleEvent e)
SampleListener
sampleStopped
in interface SampleListener
public void sampleOccurred(SampleEvent event)
sampleOccurred
in interface SampleListener
event
- the sample event that was receivedprotected final void sendToVisualizer(SampleResult r)
public void recordStats(TestElement e) throws Exception
e
- Exception
public SampleSaveConfiguration getSaveConfig()
public void setSaveConfig(SampleSaveConfiguration saveConfig)
saveConfig
- The saveConfig to set.Copyright © 1998-2014 Apache Software Foundation. All Rights Reserved.