|
Apache JMeter | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.reporters.AbstractListenerElement
org.apache.jmeter.reporters.ResultCollector
This class handles all saving of samples. The class must be thread-safe because it is shared between threads (NoThreadClone).
| Field Summary | |
static String |
FILENAME
|
| Fields inherited from interface org.apache.jmeter.testelement.TestElement |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
| Constructor Summary | |
ResultCollector()
No-arg constructor. |
|
| Method Summary | |
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 |
testIterationStart(LoopIterationEvent event)
Each time through a Thread Group's test script, an iteration event is fired for each thread. |
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. |
| Methods inherited from class org.apache.jmeter.reporters.AbstractListenerElement |
getVisualizer, setListener |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String FILENAME
| Constructor Detail |
public ResultCollector()
| Method Detail |
public Object clone()
clone in interface TestElementclone in class AbstractListenerElementpublic String getFilename()
public boolean isErrorLogging()
public void setErrorLogging(boolean errorLogging)
public void setSuccessOnlyLogging(boolean value)
public boolean isSuccessOnlyLogging()
public boolean isSampleWanted(boolean success)
success - is sample successful
public static boolean isSampleWanted(boolean success,
boolean errorOnly,
boolean successOnly)
success - status of sampleerrorOnly - if errors only wantedsuccessOnly - if success only wanted
public void setFilename(String f)
f - the new filename valuepublic void testEnded(String host)
TestListenerCalled 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 TestListenerStandardJMeterEngine.stopTest()public void testStarted(String host)
TestListenerCalled 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 TestListenerStandardJMeterEngine.run()public void testEnded()
TestListenerCalled 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 TestListenerStandardJMeterEngine.stopTest()public void testStarted()
TestListenerCalled 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 TestListenerStandardJMeterEngine.run()public void loadExistingFile()
public void sampleStarted(SampleEvent e)
SampleListener
sampleStarted in interface SampleListenerpublic void sampleStopped(SampleEvent e)
SampleListener
sampleStopped in interface SampleListenerpublic void sampleOccurred(SampleEvent event)
sampleOccurred in interface SampleListenerevent - the sample event that was receivedprotected final void sendToVisualizer(SampleResult r)
public void recordStats(TestElement e)
throws Exception
e -
Exceptionpublic void testIterationStart(LoopIterationEvent event)
TestListener
testIterationStart in interface TestListenerevent - public SampleSaveConfiguration getSaveConfig()
public void setSaveConfig(SampleSaveConfiguration saveConfig)
saveConfig - The saveConfig to set.public void clearData()
Clearable
clearData in interface Clearable
|
Apache JMeter | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||