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 class
AbsoluteThreshold.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 boolean
evaluate(List<? extends Run<?,?>> builds)
Evaluates whether the threshold is activated or notDouble
getMaximum()
Double
getMinimum()
boolean
isValid(double value)
boolean
isValid(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:Threshold
Evaluates whether the threshold is activated or not- Specified by:
evaluate
in 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:
isValid
in classThreshold
- Throws:
NullPointerException
ValidationException
-
isValid
public boolean isValid(double value) throws NullPointerException, ValidationException
- Overrides:
isValid
in classThreshold
- Throws:
NullPointerException
ValidationException
-
getMinimum
public Double getMinimum()
-
getMaximum
public Double getMaximum()
-
-