Class PercentageAverageThreshold
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Threshold>
-
- org.jenkinsci.plugins.benchmark.thresholds.Threshold
-
- org.jenkinsci.plugins.benchmark.thresholds.PercentageAverageThreshold
-
- All Implemented Interfaces:
Describable<Threshold>
public class PercentageAverageThreshold extends Threshold
Percentage threshold compared to average- Since:
- 5/16/2017
- Author:
- Daniel Mercier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPercentageAverageThreshold.DescriptorImpl-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.benchmark.thresholds.Threshold
Threshold.ThresholdTypes
-
-
Constructor Summary
Constructors Constructor Description PercentageAverageThreshold(Double percentage)PercentageAverageThreshold(String testGroup, String testName, Double percentage)
-
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 notDoublegetAverageValue()DoublegetPercentage()booleanisValid(double value)booleanisValid(int value)voidsetAverageValue(Double average)-
Methods inherited from class org.jenkinsci.plugins.benchmark.thresholds.Threshold
all, getDescriptor, getName, getTestGroup, getTestName, getType, setPreviousValue
-
-
-
-
Constructor Detail
-
PercentageAverageThreshold
@DataBoundConstructor public PercentageAverageThreshold(String testGroup, String testName, Double percentage)
-
PercentageAverageThreshold
public PercentageAverageThreshold(Double percentage) 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
-
setAverageValue
public void setAverageValue(Double average)
- Overrides:
setAverageValuein classThreshold
-
getPercentage
public Double getPercentage()
-
getAverageValue
public Double getAverageValue()
-
-