Class AbsoluteThreshold
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Threshold>
-
- org.jenkinsci.plugins.benchmark.thresholds.Threshold
-
- org.jenkinsci.plugins.benchmark.thresholds.AbsoluteThreshold
-
- All Implemented Interfaces:
Describable<Threshold>
public class AbsoluteThreshold extends Threshold
Absolute Threshold with [min, max] values- Since:
- 5/16/2017
- Author:
- Daniel Mercier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbsoluteThreshold.DescriptorImpl-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.benchmark.thresholds.Threshold
Threshold.ThresholdTypes
-
-
Constructor Summary
Constructors Constructor Description AbsoluteThreshold(Double minimum, Double maximum)AbsoluteThreshold(String testGroup, String testName, Double minimum, Double maximum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(List<? extends Run<?,?>> builds)Evaluates whether the threshold is activated or notDoublegetMaximum()DoublegetMinimum()booleanisValid(double value)booleanisValid(int value)-
Methods inherited from class org.jenkinsci.plugins.benchmark.thresholds.Threshold
all, getDescriptor, getName, getTestGroup, getTestName, getType, setAverageValue, setPreviousValue
-
-
-
-
Constructor Detail
-
AbsoluteThreshold
@DataBoundConstructor public AbsoluteThreshold(String testGroup, String testName, Double minimum, Double maximum)
-
AbsoluteThreshold
public AbsoluteThreshold(Double minimum, Double maximum) throws ValidationException
- Throws:
ValidationException
-
-
Method Detail
-
evaluate
public boolean evaluate(List<? extends Run<?,?>> builds) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, AbortException, ParseException
Description copied from class:ThresholdEvaluates whether the threshold is activated or not- Specified by:
evaluatein classThreshold- Parameters:
builds- all builds that are saved in Jenkins- Returns:
- Successful evaluation
- Throws:
IllegalArgumentException- if illegal argumentIllegalAccessException- If illegal accessInvocationTargetException- If invocation incorrectAbortException- If action abordedParseException- If parse failed
-
isValid
public boolean isValid(int value) throws NullPointerException, ValidationException- Overrides:
isValidin classThreshold- Throws:
NullPointerExceptionValidationException
-
isValid
public boolean isValid(double value) throws NullPointerException, ValidationException- Overrides:
isValidin classThreshold- Throws:
NullPointerExceptionValidationException
-
getMinimum
public Double getMinimum()
-
getMaximum
public Double getMaximum()
-
-