Class Summariser
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.engine.util.NoThreadClone
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.samplers.Remoteable
,org.apache.jmeter.samplers.SampleListener
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.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 the SummariserRunningSample 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.
-
-
Field Summary
Fields Modifier and Type Field Description private transient boolean
runningVersion
public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor Description Summariser()
Summariser(String name)
Constructor for use during startup (intended for non-GUI use)
-
Method Summary
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
testStarted()
Called just before the start of the test from the main engine thread. void
testEnded()
Called once for all threads after the end of a test. void
testStarted(String host)
Called once for each Summariser in the test plan. void
testEnded(String host)
Called from a different thread as testStarted() but using the same instance. -
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getProps, getSchema, getString, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, removed, set, setComment, setEnabled, setName, setProperty, setTemporary, traverse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Summariser
Summariser()
-
Summariser
Summariser(String name)
Constructor for use during startup (intended for non-GUI use)- Parameters:
name
- of summariser
-
-
Method Detail
-
sampleOccurred
void sampleOccurred(SampleEvent e)
Accumulates the sample in two SampleResult objects - one for running totals, and the other for deltas.
-
sampleStarted
void sampleStarted(SampleEvent e)
A sample has started.
-
sampleStopped
void sampleStopped(SampleEvent e)
A sample has stopped.
-
testStarted
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.
-
testEnded
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.
-
testStarted
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.
-
testEnded
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.
-
-
-
-