Package hudson.plugins.performance
Class PerformancePublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- hudson.plugins.performance.PerformancePublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
public class PerformancePublisher extends Recorder implements SimpleBuildStep
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PerformancePublisher.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
Fields Modifier and Type Field Description static String
ART
static String
MRT
String
optionType
static String
PRT
static double
THRESHOLD_TOLERANCE
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description PerformancePublisher(String sourceDataFiles)
PerformancePublisher(String sourceDataFiles, int errorFailedThreshold, int errorUnstableThreshold, String errorUnstableResponseTimeThreshold, double relativeFailedThresholdPositive, double relativeFailedThresholdNegative, double relativeUnstableThresholdPositive, double relativeUnstableThresholdNegative, int nthBuildNumber, boolean modePerformancePerTestCase, String configType, boolean modeOfThreshold, boolean failBuildIfNoResultFile, boolean compareBuildPrevious, boolean modeThroughput, boolean showTrendGraphs, List<PerformanceReportParser> parsers)
Legacy constructor used for internal references.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addAliases()
Mapping classes after refactoring for backward compatibility.void
compareWithAbsoluteThreshold(Run<?,?> run, TaskListener listener, Collection<PerformanceReport> parsedReports)
void
compareWithRelativeThreshold(Run<?,?> run, FilePath workspace, TaskListener listener, List<PerformanceReportParser> parsers)
void
evaluateInExpertMode(Run<?,?> run, FilePath workspace, TaskListener listener)
void
evaluateInStandardMode(Run<?,?> run, FilePath workspace, Collection<PerformanceReport> parsedReports, TaskListener listener, List<PerformanceReportParser> parsers)
int
getBaselineBuild()
protected List<UriReport>
getBuildUriReports(Run<?,?> build, FilePath workspace, TaskListener listener, List<PerformanceReportParser> parsers, boolean locatePerformanceReports)
boolean
getCompareBuildPrevious()
String
getConfigType()
List<? extends AbstractConstraint>
getConstraints()
int
getErrorFailedThreshold()
String
getErrorUnstableResponseTimeThreshold()
int
getErrorUnstableThreshold()
String
getFilename()
String
getFilterRegex()
String
getGraphType()
String
getJunitOutput()
boolean
getModeOfThreshold()
Run<?,?>
getnthBuild(Run<?,?> build)
Gets the Build object entered in the text box "Compare with nth Build"int
getNthBuildNumber()
List<PerformanceReportParser>
getParsers()
protected List<PerformanceReportParser>
getParsers(Run<?,?> build, FilePath workspace, PrintStream logger, EnvVars env)
String
getPercentiles()
static File
getPerformanceReport(Run<?,?> build, String parserDisplayName, String performanceReportName)
static String
getPerformanceReportBuildFileName(String performanceReportWorkspaceName)
Delete the date suffix appended to the Performance result files by the Maven Performance pluginstatic File[]
getPerformanceReportDirectory(Run<?,?> build, String parserDisplayName, PrintStream logger)
Action
getProjectAction(AbstractProject<?,?> project)
double
getRelativeFailedThresholdNegative()
double
getRelativeFailedThresholdPositive()
double
getRelativeUnstableThresholdNegative()
double
getRelativeUnstableThresholdPositive()
BuildStepMonitor
getRequiredMonitorService()
boolean
getShowTrendGraphs()
String
getSourceDataFiles()
boolean
isART()
boolean
isExcludeResponseTime()
boolean
isFailBuildIfNoResultFile()
boolean
isIgnoreFailedBuilds()
boolean
isIgnoreUnstableBuilds()
boolean
isModeEvaluation()
boolean
isModePerformancePerTestCase()
boolean
isModeThroughput()
boolean
isMRT()
boolean
isPersistConstraintLog()
boolean
isPRT()
boolean
isShowTrendGraphs()
protected static List<FilePath>
locatePerformanceReports(FilePath workspace, String includes)
look for performance reports based in the configured parameter includes.void
perform(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener)
Collection<PerformanceReport>
prepareEvaluation(Run<?,?> run, FilePath workspace, TaskListener listener, List<PerformanceReportParser> parsers)
preparing evaluation - this is necessary regardless of the mode of evaluationObject
readResolve()
This method, invoked after object is resurrected from persistencevoid
setBaselineBuild(int baselineBuild)
void
setCompareBuildPrevious(boolean compareBuildPrevious)
void
setConfigType(String configType)
void
setConstraints(List<? extends AbstractConstraint> constraints)
void
setErrorFailedThreshold(int errorFailedThreshold)
void
setErrorUnstableResponseTimeThreshold(String errorUnstableResponseTimeThreshold)
void
setErrorUnstableThreshold(int errorUnstableThreshold)
void
setExcludeResponseTime(boolean excludeResponseTime)
void
setFailBuildIfNoResultFile(boolean failBuildIfNoResultFile)
void
setFilename(String filename)
void
setFilterRegex(String filterRegex)
void
setGraphType(String graphType)
void
setIgnoreFailedBuilds(boolean ignoreFailedBuilds)
void
setIgnoreUnstableBuilds(boolean ignoreUnstableBuilds)
void
setJunitOutput(String junitOutput)
void
setModeEvaluation(boolean modeEvaluation)
void
setModeOfThreshold(boolean modeOfThreshold)
void
setModePerformancePerTestCase(boolean modePerformancePerTestCase)
void
setModeThroughput(boolean modeThroughput)
void
setNthBuildNumber(int nthBuildNumber)
void
setParsers(List<PerformanceReportParser> parsers)
void
setPercentiles(String percentiles)
void
setPersistConstraintLog(boolean persistConstraintLog)
void
setRelativeFailedThresholdNegative(double relativeFailedThresholdNegative)
void
setRelativeFailedThresholdPositive(double relativeFailedThresholdPositive)
void
setRelativeUnstableThresholdNegative(double relativeUnstableThresholdNegative)
void
setRelativeUnstableThresholdPositive(double relativeUnstableThresholdPositive)
void
setShowTrendGraphs(boolean showTrendGraphs)
void
setSourceDataFiles(String sourceDataFiles)
-
Methods inherited from class hudson.tasks.Recorder
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectActions, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Field Detail
-
THRESHOLD_TOLERANCE
public static final double THRESHOLD_TOLERANCE
- See Also:
- Constant Field Values
-
ART
public static final String ART
- See Also:
- Constant Field Values
-
MRT
public static final String MRT
- See Also:
- Constant Field Values
-
PRT
public static final String PRT
- See Also:
- Constant Field Values
-
optionType
public String optionType
-
-
Constructor Detail
-
PerformancePublisher
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public PerformancePublisher(String sourceDataFiles, int errorFailedThreshold, int errorUnstableThreshold, String errorUnstableResponseTimeThreshold, double relativeFailedThresholdPositive, double relativeFailedThresholdNegative, double relativeUnstableThresholdPositive, double relativeUnstableThresholdNegative, int nthBuildNumber, boolean modePerformancePerTestCase, String configType, boolean modeOfThreshold, boolean failBuildIfNoResultFile, boolean compareBuildPrevious, boolean modeThroughput, boolean showTrendGraphs, List<PerformanceReportParser> parsers)
Legacy constructor used for internal references.
-
PerformancePublisher
@DataBoundConstructor public PerformancePublisher(String sourceDataFiles)
-
-
Method Detail
-
getPerformanceReport
public static File getPerformanceReport(Run<?,?> build, String parserDisplayName, String performanceReportName)
-
getProjectAction
public Action getProjectAction(AbstractProject<?,?> project)
- Specified by:
getProjectAction
in interfaceBuildStep
- Overrides:
getProjectAction
in classBuildStepCompatibilityLayer
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
getPerformanceReportBuildFileName
public static String getPerformanceReportBuildFileName(String performanceReportWorkspaceName)
Delete the date suffix appended to the Performance result files by the Maven Performance plugin
- Returns:
- the name of the PerformanceReport in the Build
-
locatePerformanceReports
protected static List<FilePath> locatePerformanceReports(FilePath workspace, String includes) throws IOException, InterruptedException
look for performance reports based in the configured parameter includes. 'includes' is - an Ant-style pattern - a list of files and folders separated by the characters ;:,- Throws:
IOException
InterruptedException
-
getParsers
protected List<PerformanceReportParser> getParsers(Run<?,?> build, FilePath workspace, PrintStream logger, EnvVars env) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
readResolve
public Object readResolve()
This method, invoked after object is resurrected from persistence
-
perform
public void perform(@NonNull Run<?,?> run, @NonNull FilePath workspace, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
prepareEvaluation
public Collection<PerformanceReport> prepareEvaluation(Run<?,?> run, FilePath workspace, TaskListener listener, List<PerformanceReportParser> parsers) throws IOException, InterruptedException
preparing evaluation - this is necessary regardless of the mode of evaluation- Throws:
IOException
InterruptedException
-
getBuildUriReports
protected List<UriReport> getBuildUriReports(Run<?,?> build, FilePath workspace, TaskListener listener, List<PerformanceReportParser> parsers, boolean locatePerformanceReports) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
evaluateInStandardMode
public void evaluateInStandardMode(Run<?,?> run, FilePath workspace, Collection<PerformanceReport> parsedReports, TaskListener listener, List<PerformanceReportParser> parsers) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
compareWithAbsoluteThreshold
public void compareWithAbsoluteThreshold(Run<?,?> run, TaskListener listener, Collection<PerformanceReport> parsedReports)
-
compareWithRelativeThreshold
public void compareWithRelativeThreshold(Run<?,?> run, FilePath workspace, TaskListener listener, List<PerformanceReportParser> parsers) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
evaluateInExpertMode
public void evaluateInExpertMode(Run<?,?> run, FilePath workspace, TaskListener listener) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
getErrorFailedThreshold
public int getErrorFailedThreshold()
-
setErrorFailedThreshold
@DataBoundSetter public void setErrorFailedThreshold(int errorFailedThreshold)
-
getErrorUnstableThreshold
public int getErrorUnstableThreshold()
-
setErrorUnstableThreshold
@DataBoundSetter public void setErrorUnstableThreshold(int errorUnstableThreshold)
-
getErrorUnstableResponseTimeThreshold
public String getErrorUnstableResponseTimeThreshold()
-
setErrorUnstableResponseTimeThreshold
@DataBoundSetter public void setErrorUnstableResponseTimeThreshold(String errorUnstableResponseTimeThreshold)
-
isModePerformancePerTestCase
public boolean isModePerformancePerTestCase()
-
setModePerformancePerTestCase
@DataBoundSetter public void setModePerformancePerTestCase(boolean modePerformancePerTestCase)
-
getFilename
public String getFilename()
-
setFilename
public void setFilename(String filename)
-
isFailBuildIfNoResultFile
public boolean isFailBuildIfNoResultFile()
-
setFailBuildIfNoResultFile
@DataBoundSetter public void setFailBuildIfNoResultFile(boolean failBuildIfNoResultFile)
-
isART
public boolean isART()
-
isMRT
public boolean isMRT()
-
isPRT
public boolean isPRT()
-
getPerformanceReportDirectory
public static File[] getPerformanceReportDirectory(Run<?,?> build, String parserDisplayName, PrintStream logger)
-
getnthBuild
public Run<?,?> getnthBuild(Run<?,?> build)
Gets the Build object entered in the text box "Compare with nth Build"- Parameters:
build
- , listener- Returns:
- build object
-
getRelativeFailedThresholdPositive
public double getRelativeFailedThresholdPositive()
-
getRelativeFailedThresholdNegative
public double getRelativeFailedThresholdNegative()
-
setRelativeFailedThresholdPositive
@DataBoundSetter public void setRelativeFailedThresholdPositive(double relativeFailedThresholdPositive)
-
setRelativeFailedThresholdNegative
@DataBoundSetter public void setRelativeFailedThresholdNegative(double relativeFailedThresholdNegative)
-
getRelativeUnstableThresholdPositive
public double getRelativeUnstableThresholdPositive()
-
getRelativeUnstableThresholdNegative
public double getRelativeUnstableThresholdNegative()
-
setRelativeUnstableThresholdPositive
@DataBoundSetter public void setRelativeUnstableThresholdPositive(double relativeUnstableThresholdPositive)
-
setRelativeUnstableThresholdNegative
@DataBoundSetter public void setRelativeUnstableThresholdNegative(double relativeUnstableThresholdNegative)
-
getNthBuildNumber
public int getNthBuildNumber()
-
setNthBuildNumber
@DataBoundSetter public void setNthBuildNumber(int nthBuildNumber)
-
getConfigType
public String getConfigType()
-
setConfigType
@DataBoundSetter public void setConfigType(String configType)
-
getGraphType
public String getGraphType()
-
setGraphType
@DataBoundSetter public void setGraphType(String graphType)
-
getModeOfThreshold
public boolean getModeOfThreshold()
-
setModeOfThreshold
@DataBoundSetter public void setModeOfThreshold(boolean modeOfThreshold)
-
getCompareBuildPrevious
public boolean getCompareBuildPrevious()
-
setCompareBuildPrevious
@DataBoundSetter public void setCompareBuildPrevious(boolean compareBuildPrevious)
-
isModeThroughput
public boolean isModeThroughput()
-
setModeThroughput
@DataBoundSetter public void setModeThroughput(boolean modeThroughput)
-
getConstraints
public List<? extends AbstractConstraint> getConstraints()
-
setConstraints
@DataBoundSetter public void setConstraints(List<? extends AbstractConstraint> constraints)
-
setIgnoreFailedBuilds
@DataBoundSetter public void setIgnoreFailedBuilds(boolean ignoreFailedBuilds)
-
isIgnoreFailedBuilds
public boolean isIgnoreFailedBuilds()
-
setIgnoreUnstableBuilds
@DataBoundSetter public void setIgnoreUnstableBuilds(boolean ignoreUnstableBuilds)
-
isIgnoreUnstableBuilds
public boolean isIgnoreUnstableBuilds()
-
isPersistConstraintLog
public boolean isPersistConstraintLog()
-
setPersistConstraintLog
@DataBoundSetter public void setPersistConstraintLog(boolean persistConstraintLog)
-
isModeEvaluation
public boolean isModeEvaluation()
-
setModeEvaluation
@DataBoundSetter public void setModeEvaluation(boolean modeEvaluation)
-
setShowTrendGraphs
@DataBoundSetter public void setShowTrendGraphs(boolean showTrendGraphs)
-
isShowTrendGraphs
public boolean isShowTrendGraphs()
-
getShowTrendGraphs
public boolean getShowTrendGraphs()
-
getSourceDataFiles
public String getSourceDataFiles()
-
setSourceDataFiles
public void setSourceDataFiles(String sourceDataFiles)
-
getParsers
public List<PerformanceReportParser> getParsers()
-
setParsers
@DataBoundSetter public void setParsers(List<PerformanceReportParser> parsers)
-
isExcludeResponseTime
public boolean isExcludeResponseTime()
-
setExcludeResponseTime
@DataBoundSetter public void setExcludeResponseTime(boolean excludeResponseTime)
-
getJunitOutput
public String getJunitOutput()
-
setJunitOutput
@DataBoundSetter public void setJunitOutput(String junitOutput)
-
getPercentiles
public String getPercentiles()
-
setPercentiles
@DataBoundSetter public void setPercentiles(String percentiles)
-
getBaselineBuild
public int getBaselineBuild()
-
setBaselineBuild
@DataBoundSetter public void setBaselineBuild(int baselineBuild)
-
addAliases
@Initializer(before=PLUGINS_STARTED) public static void addAliases()
Mapping classes after refactoring for backward compatibility.
-
getFilterRegex
public String getFilterRegex()
- Returns:
- the filterRegex
-
setFilterRegex
@DataBoundSetter public void setFilterRegex(String filterRegex)
- Parameters:
filterRegex
- the filterRegex to set
-
-