Class AbstractSummaryConsumer<TData>
java.lang.Object
org.apache.jmeter.report.processor.AbstractSampleProcessor
org.apache.jmeter.report.processor.AbstractSampleConsumer
org.apache.jmeter.report.processor.AbstractSummaryConsumer<TData>
- Type Parameters:
TData
- the type of data to process
- All Implemented Interfaces:
SampleConsumer
,SampleProcessor
,SampleProducer
- Direct Known Subclasses:
ApdexSummaryConsumer
,ErrorsSummaryConsumer
,StatisticsSummaryConsumer
,Top5ErrorsBySamplerConsumer
The class AbstractSummaryConsumer provides a base class for data of the
dashboard page.
- Since:
- 3.0
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
The class SummaryInfo stores intermediate results. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSummaryConsumer
(boolean supportsControllersDiscrimination) Instantiates a new abstract summary consumer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Consumes the specified sample ton the specified channel.protected abstract ListResultData
createDataResult
(String key, TData data) Creates a result item for information identified by the specified key.protected abstract ListResultData
Creates the result containing titles of columns.protected abstract String
getKeyFromSample
(Sample sample) Gets the identifier key from sample.
This key is use identify the SummaryInfo linked with the sampleprotected final AbstractSummaryConsumer<TData>.SummaryInfo
Gets the overall info.protected final Map<String,
AbstractSummaryConsumer<TData>.SummaryInfo> Gets the summary infos.final boolean
Defines whether the result contains an overall item.final void
setHasOverallResult
(boolean hasOverallResult) Defines whether the result contains an overall item.void
Start the sample consuming.void
Stops the consuming process.final boolean
Indicates whether this summary can discriminate controller samplesprotected abstract void
updateData
(AbstractSummaryConsumer<TData>.SummaryInfo info, Sample sample) Update the stored data with the data from the specified sample.Methods inherited from class org.apache.jmeter.report.processor.AbstractSampleConsumer
addSampleConsumer, getConsumedChannelCount, getConsumedMetadata, getConsumer, getDataFromContext, getName, getWorkingDirectory, produce, removeSampleConsumer, setChannelAttribute, setConsumedMetadata, setDataToContext, setName, setProducedMetadata, setSampleConsumer, setSampleConsumers, setSampleContext, startProducing, stopProducing
Methods inherited from class org.apache.jmeter.report.processor.AbstractSampleProcessor
getChannelAttribute, getSampleContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jmeter.report.processor.SampleProcessor
getChannelAttribute, getSampleContext
-
Field Details
-
RESULT_VALUE_DATA
- See Also:
-
RESULT_VALUE_IS_CONTROLLER
- See Also:
-
RESULT_VALUE_ITEMS
- See Also:
-
RESULT_VALUE_OVERALL
- See Also:
-
RESULT_VALUE_SUPPORTS_CONTROLLERS_DISCRIMINATION
- See Also:
-
RESULT_VALUE_TITLES
- See Also:
-
-
Constructor Details
-
AbstractSummaryConsumer
protected AbstractSummaryConsumer(boolean supportsControllersDiscrimination) Instantiates a new abstract summary consumer.- Parameters:
supportsControllersDiscrimination
- indicates whether this summary can discriminate controller samples
-
-
Method Details
-
hasOverallResult
public final boolean hasOverallResult()Defines whether the result contains an overall item.- Returns:
- true, if the result contains an overall item
-
setHasOverallResult
public final void setHasOverallResult(boolean hasOverallResult) Defines whether the result contains an overall item.- Parameters:
hasOverallResult
- true, if the result contains an overall item; false otherwise
-
suppportsControllersDiscrimination
public final boolean suppportsControllersDiscrimination()Indicates whether this summary can discriminate controller samples- Returns:
- true, if this summary can discriminate controller samples; false otherwise.
-
getOverallInfo
Gets the overall info.- Returns:
- the overall info
-
getSummaryInfos
Gets the summary infos.- Returns:
- the summary infos
-
getKeyFromSample
Gets the identifier key from sample.
This key is use identify the SummaryInfo linked with the sample- Parameters:
sample
- the sample- Returns:
- the key identifying the sample
-
createDataResult
Creates a result item for information identified by the specified key.- Parameters:
key
- the keydata
- the data- Returns:
- the list result data
-
createResultTitles
Creates the result containing titles of columns.- Returns:
- the list of titles
-
updateData
Update the stored data with the data from the specified sample.- Parameters:
info
- SummaryInfosample
- the sample
-
startConsuming
public void startConsuming()Description copied from interface:SampleConsumer
Start the sample consuming. This step is used by consumer to initialize their process. -
consume
Description copied from interface:SampleConsumer
Consumes the specified sample ton the specified channel.- Parameters:
sample
- The sample to be consumedchannel
- The channel on which the sample is consumed
-
stopConsuming
public void stopConsuming()Description copied from interface:SampleConsumer
Stops the consuming process. No sample will be processed after this service has been called.
-