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
Nested ClassesModifier and TypeClassDescriptionprotected classThe class SummaryInfo stores intermediate results. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSummaryConsumer(boolean supportsControllersDiscrimination) Instantiates a new abstract summary consumer. -
Method Summary
Modifier and TypeMethodDescriptionvoidConsumes the specified sample ton the specified channel.protected abstract ListResultDatacreateDataResult(String key, TData data) Creates a result item for information identified by the specified key.protected abstract ListResultDataCreates the result containing titles of columns.protected abstract StringgetKeyFromSample(Sample sample) Gets the identifier key from sample.
This key is use identify the SummaryInfo linked with the sampleprotected final AbstractSummaryConsumer<TData>.SummaryInfoGets the overall info.protected final Map<String,AbstractSummaryConsumer<TData>.SummaryInfo> Gets the summary infos.final booleanDefines whether the result contains an overall item.final voidsetHasOverallResult(boolean hasOverallResult) Defines whether the result contains an overall item.voidStart the sample consuming.voidStops the consuming process.final booleanIndicates whether this summary can discriminate controller samplesprotected abstract voidupdateData(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, stopProducingMethods inherited from class org.apache.jmeter.report.processor.AbstractSampleProcessor
getChannelAttribute, getSampleContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SampleConsumerStart the sample consuming. This step is used by consumer to initialize their process. -
consume
Description copied from interface:SampleConsumerConsumes 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:SampleConsumerStops the consuming process. No sample will be processed after this service has been called.
-