Class Summariser
- java.lang.Object
-
- org.apache.jmeter.testelement.AbstractTestElement
-
- org.apache.jmeter.reporters.Summariser
-
- All Implemented Interfaces:
Serializable
,Cloneable
,NoThreadClone
,Searchable
,Remoteable
,SampleListener
,TestElement
,TestStateListener
public class Summariser extends AbstractTestElement implements Serializable, SampleListener, TestStateListener, NoThreadClone, Remoteable
Generate a summary of the test run so far to the log file and/or standard output. Both running and differential totals are shown. Output is generated every n seconds (default 30 seconds (property summariser.interval)) on the appropriate time boundary, so that multiple test runs on the same time will be synchronised. This is mainly intended for batch (non-GUI) runs FIXME : Docs below are outdated, need fixing Note that theSummariserRunningSample
start and end times relate to the samples, not the reporting interval. Since the first sample in a delta is likely to have started in the previous reporting interval, this means that the delta interval is likely to be longer than the reporting interval. Also, the sum of the delta intervals will be larger than the overall elapsed time. Data is accumulated according to the test element name.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.apache.jmeter.testelement.TestElement
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
-
-
Constructor Summary
Constructors Constructor Description Summariser()
Summariser(String name)
Constructor for use during startup (intended for non-GUI use)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sampleOccurred(SampleEvent e)
Accumulates the sample in two SampleResult objects - one for running totals, and the other for deltas.void
sampleStarted(SampleEvent e)
A sample has started.void
sampleStopped(SampleEvent e)
A sample has stopped.void
testEnded()
Called once for all threads after the end of a test.void
testEnded(String host)
Called from a different thread as testStarted() but using the same instance.void
testStarted()
Called just before the start of the test from the main engine thread.void
testStarted(String host)
Called once for each Summariser in the test plan.-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, 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, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty
-
-
-
-
Constructor Detail
-
Summariser
public Summariser()
-
Summariser
public Summariser(String name)
Constructor for use during startup (intended for non-GUI use)- Parameters:
name
- of summariser
-
-
Method Detail
-
sampleOccurred
public void sampleOccurred(SampleEvent e)
Accumulates the sample in two SampleResult objects - one for running totals, and the other for deltas.- Specified by:
sampleOccurred
in interfaceSampleListener
- Parameters:
e
- theSampleEvent
that has occurred- See Also:
SampleListener.sampleOccurred(org.apache.jmeter.samplers.SampleEvent)
-
sampleStarted
public void sampleStarted(SampleEvent e)
A sample has started.- Specified by:
sampleStarted
in interfaceSampleListener
- Parameters:
e
- theSampleEvent
that has started
-
sampleStopped
public void sampleStopped(SampleEvent e)
A sample has stopped.- Specified by:
sampleStopped
in interfaceSampleListener
- Parameters:
e
- theSampleEvent
that has stopped
-
testStarted
public void testStarted()
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.
- Specified by:
testStarted
in interfaceTestStateListener
- See Also:
StandardJMeterEngine.run()
-
testEnded
public void testEnded()
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.
- Specified by:
testEnded
in interfaceTestStateListener
- See Also:
StandardJMeterEngine.stopTest()
-
testStarted
public void testStarted(String host)
Called once for each Summariser in the test plan. There may be more than one summariser with the same name, however they will all be called before the test proper starts.However, note that this applies to a single test only. When running in client-server mode, testStarted() may be invoked after sampleOccurred().
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.
- Specified by:
testStarted
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
StandardJMeterEngine.run()
-
testEnded
public void testEnded(String host)
Called from a different thread as testStarted() but using the same instance. So synch is needed to fetch the accumulator, and the myName field will already be set up.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.
- Specified by:
testEnded
in interfaceTestStateListener
- Parameters:
host
- name of host- See Also:
StandardJMeterEngine.stopTest()
-
-