public class RegressionChecker extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BASE_DIRECTORY_PROPERTY |
static Double |
DEFAULT_VARIANCE |
static String |
FAIL_ON_PERF_REGRESSION_PROP |
static String |
PERF_ARGS_FILENAME |
static String |
PERF_DATA_FILENAME |
static String |
PERF_VAR_FILENAME |
static String |
PROPFILE_COMMENT |
static String |
RESET_NETRICS_PROP |
Constructor and Description |
---|
RegressionChecker() |
RegressionChecker(String perfArgsFileName,
String perfHistoryFileName,
String perfVarFileName) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getArg(String metricName,
String[] args,
int index,
T defaultValue,
Class<T> argClass)
Convert a String to another type
|
Map<String,Double> |
getMatchingMetrics(String pattern)
get metrics matching a particular pattern
|
String[] |
getTestArgs(String metricName)
Lookup any configured test arguments
|
double |
getVariance(String metricName) |
boolean |
isFailOnRegression()
If isFailOnRegression is false then new metrics will not
be persisted to the metrics store
|
static boolean |
isRegressionCheckEnabled() |
boolean |
isResetMetrics() |
static Boolean |
readBooleanProperty(String propName) |
void |
setFailOnRegression(boolean failOnRegression) |
void |
setResetMetrics(boolean resetMetrics) |
public static final String BASE_DIRECTORY_PROPERTY
public static final String RESET_NETRICS_PROP
public static final String FAIL_ON_PERF_REGRESSION_PROP
public static final String PERF_ARGS_FILENAME
public static final String PERF_DATA_FILENAME
public static final String PERF_VAR_FILENAME
public static final String PROPFILE_COMMENT
public static final Double DEFAULT_VARIANCE
public RegressionChecker() throws IOException
IOException
public RegressionChecker(String perfArgsFileName, String perfHistoryFileName, String perfVarFileName) throws IOException
IOException
public static boolean isRegressionCheckEnabled()
public boolean isFailOnRegression()
public boolean isResetMetrics()
public void setFailOnRegression(boolean failOnRegression)
public void setResetMetrics(boolean resetMetrics)
public <T> T getArg(String metricName, String[] args, int index, T defaultValue, Class<T> argClass)
T
- the type which args[index] should be converted tometricName
- the name of the test to use if there was a data format errorargs
- arguments returned from a prior call to getTestArgs(String)
index
- index into the args array to the value to be converteddefaultValue
- default value if the index is out of rangeargClass
- class type to convert the value to (which must have a constructor that takes a String value)public String[] getTestArgs(String metricName)
metricName
- the name of the testpublic Map<String,Double> getMatchingMetrics(String pattern)
pattern
- the regex used as the patternpublic double getVariance(String metricName)
Copyright © 2021 JBoss by Red Hat. All rights reserved.