Class AbstractGraphConsumer
- All Implemented Interfaces:
SampleConsumer
,SampleProcessor
,SampleProducer
- Direct Known Subclasses:
AbstractOverTimeGraphConsumer
,AbstractVersusRequestsGraphConsumer
,ResponseTimeDistributionGraphConsumer
,ResponseTimePercentilesGraphConsumer
,ResponseTimePerSampleGraphConsumer
,SyntheticResponseTimeDistributionGraphConsumer
,TimeVSThreadGraphConsumer
The class AbstractGraphConsumer provides a consumer that build a sorted map from samples. It uses a projection to define the key (x-axis coordinate) and an aggregator to define the value (y-axis coordinate).
About the seriesData:Series are defined by the seriesSelector, so they can be static or dynamic (sample linked) depending on the implementation of the selector.
About the groupData:The grapher build an aggregator for each seriesData/key pair using an external factory. All groupData from a series do the same aggregate calculation.
About the keys (x-axis coordinates):Keys are defined by the keysSelector for each seriesData, so the keys can be different depending on the seriesData
About the values (y-axis coordinates):Values are defined by the result aggregate produced by each aggregator. During consumption, values to add to the groupData are defined by the valueSelector.
- Since:
- 3.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
protected static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Consumes the specified sample ton the specified channel.protected abstract GraphKeysSelector
protected MapResultData
createSerieResult
(String series, SeriesData seriesData) final String
Gets the format for the name of aggregated keys seriesData.Gets the group information.protected final boolean
Get flag to indicate we should swap keys and values.protected final GraphKeysSelector
Gets the keys selector.final String
Gets the format of the "overall" seriesData name.final String
getTitle()
Gets the title of the graph.void
protected abstract void
initializeExtraResults
(MapResultData parentResult) Inherited classes can add properties to the resultfinal boolean
Indicates if the graph renders percentiles.final void
setAggregatedKeysSeriesFormat
(String aggregatedKeysSeriesFormat) Sets the format for the name of aggregated keys seriesData.final void
setOverallSeriesFormat
(String overallSeriesFormat) Sets the format of the "overall" seriesData name.final void
setRenderPercentiles
(boolean renderPercentiles) Enables or disables the percentiles render.protected final void
setRevertKeysAndValues
(boolean invertKeysAndValues) Set flag to indicate we should swap keys and values.final void
Sets the title of the graph.void
Start the sample consuming.void
Stops the consuming process.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
-
DEFAULT_GROUP
- See Also:
-
RESULT_MIN_X
- See Also:
-
RESULT_MAX_X
- See Also:
-
RESULT_MIN_Y
- See Also:
-
RESULT_MAX_Y
- See Also:
-
RESULT_TITLE
- See Also:
-
RESULT_SUPPORTS_CONTROLLERS_DISCRIMINATION
- See Also:
-
RESULT_SERIES
- See Also:
-
RESULT_SERIES_NAME
- See Also:
-
RESULT_SERIES_DATA
- See Also:
-
RESULT_SERIES_IS_CONTROLLER
- See Also:
-
RESULT_SERIES_IS_OVERALL
- See Also:
-
DEFAULT_OVERALL_SERIES_FORMAT
- See Also:
-
DEFAULT_AGGREGATED_KEYS_SERIES_FORMAT
- See Also:
-
-
Constructor Details
-
AbstractGraphConsumer
protected AbstractGraphConsumer()
-
-
Method Details
-
getGroupInfos
Gets the group information.- Returns:
- the group information
-
getInvertsKeysAndValues
protected final boolean getInvertsKeysAndValues()Get flag to indicate we should swap keys and values.- Returns:
- the invertKeysAndValues flag
-
setRevertKeysAndValues
protected final void setRevertKeysAndValues(boolean invertKeysAndValues) Set flag to indicate we should swap keys and values.- Parameters:
invertKeysAndValues
- the reverts keys and values
-
rendersPercentiles
public final boolean rendersPercentiles()Indicates if the graph renders percentiles.- Returns:
- true if percentiles are rendered; false otherwise
-
setRenderPercentiles
public final void setRenderPercentiles(boolean renderPercentiles) Enables or disables the percentiles render.- Parameters:
renderPercentiles
- flag to render percentiles or not
-
getKeysSelector
Gets the keys selector.- Returns:
- the keys selector
-
getOverallSeriesFormat
Gets the format of the "overall" seriesData name.- Returns:
- the format of the "overall" seriesData name
-
setOverallSeriesFormat
Sets the format of the "overall" seriesData name.- Parameters:
overallSeriesFormat
- the name of "overall" seriesData to set
-
getAggregatedKeysSeriesFormat
Gets the format for the name of aggregated keys seriesData.- Returns:
- the format for the name of aggregated keys seriesData
-
setAggregatedKeysSeriesFormat
Sets the format for the name of aggregated keys seriesData.- Parameters:
aggregatedKeysSeriesFormat
- the format for the name of aggregated keys seriesData to set
-
getTitle
Gets the title of the graph.- Returns:
- the title of the graph
-
setTitle
Sets the title of the graph.- Parameters:
title
- the title to set
-
createKeysSelector
-
createGroupInfos
-
createSerieResult
- Parameters:
series
- The series nameseriesData
-SeriesData
- Returns:
- MapResultData metadata for serie
-
initializeExtraResults
Inherited classes can add properties to the result- Parameters:
parentResult
- the parent result
-
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. -
initialize
public void initialize()
-