Class MovingAverageConfiguration

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

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

    • 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