Class DeltaThreshold
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<Threshold>
-
- org.jenkinsci.plugins.benchmark.thresholds.Threshold
-
- org.jenkinsci.plugins.benchmark.thresholds.DeltaThreshold
-
- All Implemented Interfaces:
Describable<Threshold>
public class DeltaThreshold extends Threshold
Delta value threshold compared to last build- Since:
- 5/16/2017
- Author:
- Daniel Mercier
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeltaThreshold.DescriptorImpl
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.benchmark.thresholds.Threshold
Threshold.ThresholdTypes
-
-
Constructor Summary
Constructors Constructor Description DeltaThreshold(Double delta)
DeltaThreshold(String testGroup, String testName, Double delta)
-
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
getDelta()
Double
getPrevious()
boolean
isValid(double value)
boolean
isValid(int value)
void
setPreviousValue(Double previousValue)
-
Methods inherited from class org.jenkinsci.plugins.benchmark.thresholds.Threshold
all, getDescriptor, getName, getTestGroup, getTestName, getType, setAverageValue
-
-
-
-
Constructor Detail
-
DeltaThreshold
@DataBoundConstructor public DeltaThreshold(String testGroup, String testName, Double delta)
-
DeltaThreshold
public DeltaThreshold(Double delta) 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
-
setPreviousValue
public void setPreviousValue(Double previousValue)
- Overrides:
setPreviousValue
in classThreshold
-
getDelta
public Double getDelta()
-
getPrevious
public Double getPrevious()
-
-