Class PerformancePublisher

All Implemented Interfaces:
ExtensionPoint, Describable<Publisher>, BuildStep, SimpleBuildStep

public class PerformancePublisher extends Recorder implements SimpleBuildStep
  • Field Details

  • Constructor Details

    • 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 Details

    • getPerformanceReport

      public static File getPerformanceReport(Run<?,?> build, String parserDisplayName, String performanceReportName)
    • getProjectAction

      public Action getProjectAction(AbstractProject<?,?> project)
      Specified by:
      getProjectAction in interface BuildStep
      Overrides:
      getProjectAction in class BuildStepCompatibilityLayer
    • getRequiredMonitorService

      public BuildStepMonitor getRequiredMonitorService()
      Specified by:
      getRequiredMonitorService in interface BuildStep
    • 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 interface SimpleBuildStep
      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