Class Statistics


  • public class Statistics
    extends Object
    The statistics object which will be logged.
    Author:
    Tomas Westling <tomas.westling@sonymobile.com>
    • Constructor Detail

      • Statistics

        public Statistics​(String projectName,
                          int buildNumber,
                          String displayName,
                          Date startingTime,
                          long duration,
                          List<String> triggerCauses,
                          String nodeName,
                          String master,
                          int timeZoneOffset,
                          String result,
                          Statistics.UpstreamCause upstreamCause,
                          List<FailureCauseStatistics> failureCauseStatistics)
        Standard/JSON constructor.
        Parameters:
        projectName - the project name.
        buildNumber - the build number.
        displayName - the build display name.
        startingTime - the starting time.
        duration - the duration.
        triggerCauses - the causes that triggered this build.
        nodeName - the name of the node this build ran on.
        master - the master this build ran on.
        timeZoneOffset - the time zone offset.
        result - the result of the build.
        upstreamCause - the upstream cause of the current build, if any.
        failureCauseStatistics - the statistics for the FailureCauses.
      • Statistics

        @Deprecated
        public Statistics​(String projectName,
                          int buildNumber,
                          Date startingTime,
                          long duration,
                          List<String> triggerCauses,
                          String nodeName,
                          String master,
                          int timeZoneOffset,
                          String result,
                          List<FailureCauseStatistics> failureCauseStatistics)
        Deprecated.
        , kept for backwards compatibility.
        Deprecated statistics constructor.
        Parameters:
        projectName - the project name.
        buildNumber - the build number.
        startingTime - the starting time.
        duration - the duration.
        triggerCauses - the causes that triggered this build.
        nodeName - the name of the node this build ran on.
        master - the master this build ran on.
        timeZoneOffset - the time zone offset.
        result - the result of the build.
        failureCauseStatistics - the statistics for the FailureCauses.
    • Method Detail

      • getProjectName

        public String getProjectName()
        Getter for the project name.
        Returns:
        the project name.
      • getBuildNumber

        public int getBuildNumber()
        Getter for the build number.
        Returns:
        the build number.
      • getDisplayName

        public String getDisplayName()
        Getter for the build display name.
        Returns:
        the build display name.
      • getStartingTime

        public Date getStartingTime()
        Getter for the starting time.
        Returns:
        the starting time.
      • getDuration

        public long getDuration()
        Getter for the duration.
        Returns:
        the duration.
      • getTriggerCauses

        public List<String> getTriggerCauses()
        Getter for the build cause that triggered the build.
        Returns:
        the causes as a list.
      • getSlaveHostName

        public String getSlaveHostName()
        Getter for the host name of the slave.
        Returns:
        the host name of the slave.
      • getMaster

        public String getMaster()
        Getter for the Jenkins master.
        Returns:
        the master.
      • getTimeZoneOffset

        public int getTimeZoneOffset()
        Getter for the time zone offset in milliseconds.
        Returns:
        the time zone offset.
      • getResult

        public String getResult()
        Getter for the result of the build.
        Returns:
        the result.
      • getUpstreamCause

        public Statistics.UpstreamCause getUpstreamCause()
        Getter for the upstream cause description.
        Returns:
        the upstream cause description.
      • getFailureCauseStatisticsList

        public List<FailureCauseStatistics> getFailureCauseStatisticsList()
        Getter for the List of statistics for FailureCauses.
        Returns:
        the list.