Class AbstractConstraint
java.lang.Object
hudson.plugins.performance.constraints.AbstractConstraint
- All Implemented Interfaces:
ExtensionPoint,Describable<AbstractConstraint>
- Direct Known Subclasses:
AbsoluteConstraint,RelativeConstraint
public abstract class AbstractConstraint
extends Object
implements Describable<AbstractConstraint>, ExtensionPoint
Parent class for AbsoluteConstraint and RelativeConstraint
- Author:
- Rene Kugel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractConstraint(AbstractConstraint.Metric meteredValue, AbstractConstraint.Operator operator, String relatedPerfReport, AbstractConstraint.Escalation escalationLevel, boolean success, TestCaseBlock testCaseBlock) -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtensionList<AbstractConstraint>all()protected voidcheckForDefectiveParams(List<? extends Run<?, ?>> builds) Checks whether all parameters given in the UI are processable.protected doublecheckMetredValueforPerfReport(AbstractConstraint.Metric meteredValue, PerformanceReport pr) Grabs a specified Metric in a specified PerformanceReportprotected doublecheckMetredValueforUriReport(AbstractConstraint.Metric meteredValue, UriReport ur) Grabs a specified Metric in a specified UriReportabstract AbstractConstraintclone()Cloning of a constraint Note that this is not from the Interface Clonableabstract ConstraintEvaluationEvaluates whether the constraint is fulfilled or violatedbooleanbooleanvoidsetEscalationLevel(AbstractConstraint.Escalation escalationLevel) voidsetJunitResult(String junitResult) voidsetMeteredValue(AbstractConstraint.Metric meteredValue) voidsetOperator(AbstractConstraint.Operator operator) voidsetRelatedPerfReport(String relatedPerfReport) voidsetResultMessage(String resultMessage) voidsetSettings(ConstraintSettings settings) voidsetSpecifiedTestCase(boolean isSpecifiedTestCase) voidsetSuccess(boolean success) voidsetTestCase(String testCase) voidsetTestCaseBlock(TestCaseBlock testCaseBlock)
-
Field Details
-
ANY
- See Also:
-
NOW
- See Also:
-
-
Constructor Details
-
AbstractConstraint
protected AbstractConstraint(AbstractConstraint.Metric meteredValue, AbstractConstraint.Operator operator, String relatedPerfReport, AbstractConstraint.Escalation escalationLevel, boolean success, TestCaseBlock testCaseBlock)
-
-
Method Details
-
getDescriptor
- Specified by:
getDescriptorin interfaceDescribable<AbstractConstraint>
-
all
-
clone
Cloning of a constraint Note that this is not from the Interface Clonable -
evaluate
public abstract ConstraintEvaluation evaluate(List<? extends Run<?, ?>> builds) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, AbortException, ParseExceptionEvaluates whether the constraint is fulfilled or violated- Parameters:
builds- all builds that are saved in Jenkins- Returns:
- Throws:
IllegalArgumentExceptionIllegalAccessExceptionInvocationTargetExceptionAbortExceptionParseException
-
checkMetredValueforUriReport
Grabs a specified Metric in a specified UriReport- Parameters:
meteredValue- the metric that should be evaluatedur- the UriReport where the metric should be measured- Returns:
- the value of the specified metric in the specified UriReport
-
checkMetredValueforPerfReport
protected double checkMetredValueforPerfReport(AbstractConstraint.Metric meteredValue, PerformanceReport pr) Grabs a specified Metric in a specified PerformanceReport- Parameters:
meteredValue- the metric that should be evaluatedpr- the PerformanceReport where the metric should be measured- Returns:
- the value of the specified metric in the specified PerformanceReport
-
checkForDefectiveParams
Checks whether all parameters given in the UI are processable.- Parameters:
builds- all stored jenkins builds- Throws:
AbortException- if a parameter in the UI is not processable
-
setSuccess
public void setSuccess(boolean success) -
getSuccess
public boolean getSuccess() -
getResultMessage
-
setResultMessage
-
getJunitResult
-
setJunitResult
-
getRelatedPerfReport
-
setRelatedPerfReport
-
getMeteredValue
-
setMeteredValue
-
getOperator
-
setOperator
-
getEscalationLevel
-
setEscalationLevel
-
getTestCaseBlock
-
setTestCaseBlock
-
isSpecifiedTestCase
public boolean isSpecifiedTestCase() -
setSpecifiedTestCase
public void setSpecifiedTestCase(boolean isSpecifiedTestCase) -
getSettings
-
setSettings
-
getTestCase
-
setTestCase
-