org.apache.jmeter.report.processor.graph

## Class AbstractGraphConsumer

- java.lang.Object
- - org.apache.jmeter.report.processor.AbstractSampleProcessor
  - - org.apache.jmeter.report.processor.AbstractSampleConsumer
    - - org.apache.jmeter.report.processor.graph.AbstractGraphConsumer

- All Implemented Interfaces:
    SampleConsumer, SampleProcessor, SampleProducer
  Direct Known Subclasses:
    AbstractOverTimeGraphConsumer, AbstractVersusRequestsGraphConsumer, ResponseTimeDistributionGraphConsumer, ResponseTimePercentilesGraphConsumer, ResponseTimePerSampleGraphConsumer, SyntheticResponseTimeDistributionGraphConsumer, TimeVSThreadGraphConsumer

      public abstract class AbstractGraphConsumer
      extends AbstractSampleConsumer

  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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DEFAULT_AGGREGATED_KEYS_SERIES_FORMAT` The Constant DEFAULT_AGGREGATED_KEYS_SERIES_FORMAT.
    `protected static java.lang.String` | `DEFAULT_GROUP`
    `static java.lang.String` | `DEFAULT_OVERALL_SERIES_FORMAT` The Constant DEFAULT_OVERALL_SERIES_NAME.
    `static java.lang.String` | `RESULT_MAX_X`
    `static java.lang.String` | `RESULT_MAX_Y`
    `static java.lang.String` | `RESULT_MIN_X`
    `static java.lang.String` | `RESULT_MIN_Y`
    `static java.lang.String` | `RESULT_SERIES`
    `static java.lang.String` | `RESULT_SERIES_DATA`
    `static java.lang.String` | `RESULT_SERIES_IS_CONTROLLER`
    `static java.lang.String` | `RESULT_SERIES_IS_OVERALL`
    `static java.lang.String` | `RESULT_SERIES_NAME`
    `static java.lang.String` | `RESULT_SUPPORTS_CONTROLLERS_DISCRIMINATION`
    `static java.lang.String` | `RESULT_TITLE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractGraphConsumer()` Instantiates a new abstract graph consumer.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `consume(Sample sample, int channel)` Consumes the specified sample ton the specified channel.
    `protected abstract java.util.Map<java.lang.String,GroupInfo>` | `createGroupInfos()`
    `protected abstract GraphKeysSelector` | `createKeysSelector()`
    `protected MapResultData` | `createSerieResult(java.lang.String serie, SeriesData seriesData)`
    `java.lang.String` | `getAggregatedKeysSeriesFormat()` Gets the format for the name of aggregated keys seriesData.
    `protected java.util.HashMap<java.lang.String,GroupInfo>` | `getGroupInfos()` Gets the group information.
    `protected GraphKeysSelector` | `getKeysSelector()` Gets the keys selector.
    `java.lang.String` | `getOverallSeriesFormat()` Gets the format of the "overall" seriesData name.
    `java.lang.String` | `getTitle()` Gets the title of the graph.
    `void` | `initialize()`
    `protected abstract void` | `initializeExtraResults(MapResultData parentResult)` Inherited classes can add properties to the result
    `boolean` | `rendersPercentiles()` Indicates if the graph renders percentiles.
    `protected boolean` | `revertsKeysAndValues()` Reverts keys and values.
    `void` | `setAggregatedKeysSeriesFormat(java.lang.String aggregatedKeysSeriesFormat)` Sets the format for the name of aggregated keys seriesData.
    `void` | `setOverallSeriesFormat(java.lang.String overallSeriesFormat)` Sets the format of the "overall" seriesData name.
    `void` | `setRenderPercentiles(boolean renderPercentiles)` Enables or disables the percentiles render.
    `protected void` | `setRevertKeysAndValues(boolean revertsKeysAndValues)` Reverts keys and values.
    `void` | `setTitle(java.lang.String title)` Sets the title of the graph.
    `void` | `startConsuming()` Start the sample consuming.
    `void` | `stopConsuming()` 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 Detail

    - #### DEFAULT_GROUP

          protected static final java.lang.String DEFAULT_GROUP

      See Also:
        Constant Field Values

    - #### RESULT_MIN_X

          public static final java.lang.String RESULT_MIN_X

      See Also:
        Constant Field Values

    - #### RESULT_MAX_X

          public static final java.lang.String RESULT_MAX_X

      See Also:
        Constant Field Values

    - #### RESULT_MIN_Y

          public static final java.lang.String RESULT_MIN_Y

      See Also:
        Constant Field Values

    - #### RESULT_MAX_Y

          public static final java.lang.String RESULT_MAX_Y

      See Also:
        Constant Field Values

    - #### RESULT_TITLE

          public static final java.lang.String RESULT_TITLE

      See Also:
        Constant Field Values

    - #### RESULT_SUPPORTS_CONTROLLERS_DISCRIMINATION

          public static final java.lang.String RESULT_SUPPORTS_CONTROLLERS_DISCRIMINATION

      See Also:
        Constant Field Values

    - #### RESULT_SERIES

          public static final java.lang.String RESULT_SERIES

      See Also:
        Constant Field Values

    - #### RESULT_SERIES_NAME

          public static final java.lang.String RESULT_SERIES_NAME

      See Also:
        Constant Field Values

    - #### RESULT_SERIES_DATA

          public static final java.lang.String RESULT_SERIES_DATA

      See Also:
        Constant Field Values

    - #### RESULT_SERIES_IS_CONTROLLER

          public static final java.lang.String RESULT_SERIES_IS_CONTROLLER

      See Also:
        Constant Field Values

    - #### RESULT_SERIES_IS_OVERALL

          public static final java.lang.String RESULT_SERIES_IS_OVERALL

      See Also:
        Constant Field Values

    - #### DEFAULT_OVERALL_SERIES_FORMAT

          public static final java.lang.String DEFAULT_OVERALL_SERIES_FORMAT

      The Constant DEFAULT_OVERALL_SERIES_NAME.
      See Also:
        Constant Field Values

    - #### DEFAULT_AGGREGATED_KEYS_SERIES_FORMAT

          public static final java.lang.String DEFAULT_AGGREGATED_KEYS_SERIES_FORMAT

      The Constant DEFAULT_AGGREGATED_KEYS_SERIES_FORMAT.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractGraphConsumer

          protected AbstractGraphConsumer()

      Instantiates a new abstract graph consumer.

  - ### Method Detail

    - #### getGroupInfos

          protected final java.util.HashMap<java.lang.String,GroupInfo> getGroupInfos()

      Gets the group information.
      Returns:
        the group information

    - #### revertsKeysAndValues

          protected final boolean revertsKeysAndValues()

      Reverts keys and values.
      Returns:
        the revertKeysAndValues

    - #### setRevertKeysAndValues

          protected final void setRevertKeysAndValues(boolean revertsKeysAndValues)

      Reverts keys and values.
      Parameters:
        `revertsKeysAndValues` - 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` - the render mode to set

    - #### getKeysSelector

          protected final GraphKeysSelector getKeysSelector()

      Gets the keys selector.
      Returns:
        the keys selector

    - #### getOverallSeriesFormat

          public final java.lang.String getOverallSeriesFormat()

      Gets the format of the "overall" seriesData name.
      Returns:
        the format of the "overall" seriesData name

    - #### setOverallSeriesFormat

          public final void setOverallSeriesFormat(java.lang.String overallSeriesFormat)

      Sets the format of the "overall" seriesData name.
      Parameters:
        `overallSeriesFormat` - the name of "overall" seriesData to set

    - #### getAggregatedKeysSeriesFormat

          public final java.lang.String getAggregatedKeysSeriesFormat()

      Gets the format for the name of aggregated keys seriesData.
      Returns:
        the format for the name of aggregated keys seriesData

    - #### setAggregatedKeysSeriesFormat

          public final void setAggregatedKeysSeriesFormat(java.lang.String aggregatedKeysSeriesFormat)

      Sets the format for the name of aggregated keys seriesData.
      Parameters:
        `aggregatedKeysSeriesFormat` - the format for the name of aggregated keys seriesData to set

    - #### getTitle

          public final java.lang.String getTitle()

      Gets the title of the graph.
      Returns:
        the title of the graph

    - #### setTitle

          public final void setTitle(java.lang.String title)

      Sets the title of the graph.
      Parameters:
        `title` - the title to set

    - #### createKeysSelector

          protected abstract GraphKeysSelector createKeysSelector()

    - #### createGroupInfos

          protected abstract java.util.Map<java.lang.String,GroupInfo> createGroupInfos()

    - #### createSerieResult

          protected MapResultData createSerieResult(java.lang.String serie,
                                                    SeriesData seriesData)

      Parameters:
        `serie` - String serie name
        `seriesData` - `SeriesData`
      Returns:
        MapResultData metadata for serie

    - #### initializeExtraResults

          protected abstract void initializeExtraResults(MapResultData parentResult)

      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

          public void consume(Sample sample,
                              int channel)

      Description copied from interface: `SampleConsumer`
      Consumes the specified sample ton the specified channel.
      Parameters:
        `sample` - The sample to be consumed
        `channel` - 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()

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.