Class 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.

  • Field Details

  • Constructor Details

    • AbstractGraphConsumer

      protected AbstractGraphConsumer()
  • Method Details

    • getGroupInfos

      protected final HashMap<String,GroupInfo> getGroupInfos()
      Gets the group information.
      the group information
    • getInvertsKeysAndValues

      protected final boolean getInvertsKeysAndValues()
      Get flag to indicate we should swap keys and values.
      the invertKeysAndValues flag
    • setRevertKeysAndValues

      protected final void setRevertKeysAndValues(boolean invertKeysAndValues)
      Set flag to indicate we should swap keys and values.
      invertKeysAndValues - the reverts keys and values
    • rendersPercentiles

      public final boolean rendersPercentiles()
      Indicates if the graph renders percentiles.
      true if percentiles are rendered; false otherwise
    • setRenderPercentiles

      public final void setRenderPercentiles(boolean renderPercentiles)
      Enables or disables the percentiles render.
      renderPercentiles - flag to render percentiles or not
    • getKeysSelector

      protected final GraphKeysSelector getKeysSelector()
      Gets the keys selector.
      the keys selector
    • getOverallSeriesFormat

      public final String getOverallSeriesFormat()
      Gets the format of the "overall" seriesData name.
      the format of the "overall" seriesData name
    • setOverallSeriesFormat

      public final void setOverallSeriesFormat(String overallSeriesFormat)
      Sets the format of the "overall" seriesData name.
      overallSeriesFormat - the name of "overall" seriesData to set
    • getAggregatedKeysSeriesFormat

      public final String getAggregatedKeysSeriesFormat()
      Gets the format for the name of aggregated keys seriesData.
      the format for the name of aggregated keys seriesData
    • setAggregatedKeysSeriesFormat

      public final void setAggregatedKeysSeriesFormat(String aggregatedKeysSeriesFormat)
      Sets the format for the name of aggregated keys seriesData.
      aggregatedKeysSeriesFormat - the format for the name of aggregated keys seriesData to set
    • getTitle

      public final String getTitle()
      Gets the title of the graph.
      the title of the graph
    • setTitle

      public final void setTitle(String title)
      Sets the title of the graph.
      title - the title to set
    • createKeysSelector

      protected abstract GraphKeysSelector createKeysSelector()
    • createGroupInfos

      protected abstract Map<String,GroupInfo> createGroupInfos()
    • createSerieResult

      protected MapResultData createSerieResult(String series, SeriesData seriesData)
      series - The series name
      seriesData - SeriesData
      MapResultData metadata for serie
    • initializeExtraResults

      protected abstract void initializeExtraResults(MapResultData parentResult)
      Inherited classes can add properties to the result
      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.
      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()