Class RegressionChecker

java.lang.Object
io.narayana.perf.RegressionChecker

public class RegressionChecker extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • isRegressionCheckEnabled

      public static boolean isRegressionCheckEnabled()
    • readBooleanProperty

      public static Boolean readBooleanProperty(String propName)
    • isFailOnRegression

      public boolean isFailOnRegression()
      If isFailOnRegression is false then new metrics will not be persisted to the metrics store
      Returns:
      whether or not to mark regressions as failures
    • isResetMetrics

      public boolean isResetMetrics()
    • setFailOnRegression

      public void setFailOnRegression(boolean failOnRegression)
    • setResetMetrics

      public void setResetMetrics(boolean resetMetrics)
    • getArg

      public <T> T getArg(String metricName, String[] args, int index, T defaultValue, Class<T> argClass)
      Convert a String to another type
      Type Parameters:
      T - the type which args[index] should be converted to
      Parameters:
      metricName - the name of the test to use if there was a data format error
      args - arguments returned from a prior call to getTestArgs(String)
      index - index into the args array to the value to be converted
      defaultValue - default value if the index is out of range
      argClass - class type to convert the value to (which must have a constructor that takes a String value)
      Returns:
      the converted value
    • getTestArgs

      public String[] getTestArgs(String metricName)
      Lookup any configured test arguments
      Parameters:
      metricName - the name of the test
      Returns:
      any test arguments or an empty array if there are none
    • getMatchingMetrics

      public Map<String,Double> getMatchingMetrics(String pattern)
      get metrics matching a particular pattern
      Parameters:
      pattern - the regex used as the pattern
      Returns:
      a map of matching metric names to the current value of the metric
    • getVariance

      public double getVariance(String metricName)