Class Threshold
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Threshold>
-
- org.jenkinsci.plugins.benchmark.thresholds.Threshold
-
- All Implemented Interfaces:
Describable<Threshold>
- Direct Known Subclasses:
AbsoluteThreshold
,DeltaAverageThreshold
,DeltaThreshold
,PercentageAverageThreshold
,PercentageThreshold
public abstract class Threshold extends AbstractDescribableImpl<Threshold>
Threshold base class CAREFULL, this is connected to JELLY- Since:
- 5/16/2017.
- Author:
- Daniel Mercier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Threshold.ThresholdTypes
-
Constructor Summary
Constructors Modifier Constructor Description protected
Threshold(String testGroup, String testName, Threshold.ThresholdTypes type)
protected
Threshold(Threshold.ThresholdTypes type)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<Threshold>
all()
abstract boolean
evaluate(List<? extends Run<?,?>> builds)
Evaluates whether the threshold is activated or notThresholdDescriptor
getDescriptor()
String
getName()
String
getTestGroup()
String
getTestName()
Threshold.ThresholdTypes
getType()
boolean
isValid(double value)
boolean
isValid(int value)
void
setAverageValue(Double average)
void
setPreviousValue(Double average)
-
-
-
Constructor Detail
-
Threshold
protected Threshold(String testGroup, String testName, Threshold.ThresholdTypes type)
-
Threshold
protected Threshold(Threshold.ThresholdTypes type)
-
-
Method Detail
-
all
public static ExtensionList<Threshold> all()
-
getDescriptor
public ThresholdDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Threshold>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<Threshold>
-
isValid
public boolean isValid(int value) throws NullPointerException, ValidationException
-
isValid
public boolean isValid(double value) throws NullPointerException, ValidationException
-
evaluate
public abstract boolean evaluate(List<? extends Run<?,?>> builds) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, AbortException, ParseException
Evaluates whether the threshold is activated or not- 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
-
setAverageValue
public void setAverageValue(Double average)
-
setPreviousValue
public void setPreviousValue(Double average)
-
getName
public String getName()
-
getType
public Threshold.ThresholdTypes getType()
-
getTestGroup
public String getTestGroup()
-
getTestName
public String getTestName()
-
-