Package com.xceptance.xlt.api.report

# Class MovingAverageConfiguration

java.lang.Object
com.xceptance.xlt.api.report.MovingAverageConfiguration

public class MovingAverageConfiguration extends Object
Holds the configuration for a moving average.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `MovingAverageConfiguration.MovingAverageType`
  Moving average type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MovingAverageConfiguration`
  `createPercentageConfig(int percentage)`
  Create a moving average configuration of type "percentage" with the given percentage value.
  `static MovingAverageConfiguration`
  `createTimeConfig(int seconds)`
  Create a moving average configuration of type "time" with the given time interval in seconds.
  `static MovingAverageConfiguration`
  `createTimeConfig(int seconds, String name)`
  Create a moving average configuration of type "time" with the given time interval in seconds and the given custom name.
  `String`
  `getName()`
  Get the name of the moving average configuration.
  `MovingAverageConfiguration.MovingAverageType`
  `getType()`
  Get the type of the moving average configuration.
  `int`
  `getValue()`
  Get the value of the moving average configuration.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getType

    public MovingAverageConfiguration.MovingAverageType getType()
    Get the type of the moving average configuration.
    Returns:
      the type of the moving average configuration

  - ### getValue

    public int getValue()
    Get the value of the moving average configuration.
    Returns:
      the value of the moving average configuration. For "percentage" averages this is a percentage integer value (e.g. a value of "25" means "25%"). For "time" averages this is a time interval in seconds.

  - ### getName

    public String getName()
    Get the name of the moving average configuration.
    Returns:
      the name of the moving average configuration

  - ### createPercentageConfig

    public static MovingAverageConfiguration createPercentageConfig(int percentage)
    Create a moving average configuration of type "percentage" with the given percentage value.
    Parameters:
      `percentage` - an integer value representing the percentage (e.g. a value of "25" means "25%")
    Returns:
      the "percentage" moving average configuration

  - ### createTimeConfig

    public static MovingAverageConfiguration createTimeConfig(int seconds)
    Create a moving average configuration of type "time" with the given time interval in seconds.
    Parameters:
      `seconds` - an integer value representing a time interval in seconds (e.g. a value of "30" means that the average should be calculated over the last 30 seconds)
    Returns:
      the "time" moving average configuration

  - ### createTimeConfig

    public static MovingAverageConfiguration createTimeConfig(int seconds, String name)
    Create a moving average configuration of type "time" with the given time interval in seconds and the given custom name. This can be used to provide a name that is easier to comprehend than a number of seconds (e.g. the name "5m30s" might be more helpful than "330s").
    Parameters:
      `seconds` - an integer value representing the time interval in seconds (e.g. a value of "30" means that the average should be calculated over the last 30 seconds)
      `name` - the custom name for this configuration
    Returns:
      the "time" moving average configuration

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`