Class TimeInQueueAction

java.lang.Object
jenkins.metrics.impl.TimeInQueueAction
All Implemented Interfaces:
Action, ModelObject, Serializable, RunAction2

@ExportedBean public class TimeInQueueAction extends Object implements Serializable, RunAction2
Tracks the time spent in the queue
See Also:
  • Constructor Details

    • TimeInQueueAction

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) @Deprecated public TimeInQueueAction(long queuingDurationMillis)
      Deprecated.
      Constructor.
      Parameters:
      queuingDurationMillis - How long spent queuing.
    • TimeInQueueAction

      public TimeInQueueAction(long millisecondsInQueue, long blockedDurationMillis, long buildableDurationMillis, long waitingDurationMillis)
      Constructor.
      Parameters:
      millisecondsInQueue - How long spent queuing.
      blockedDurationMillis - How long spent in the queue because blocked.
      buildableDurationMillis - How long spent in the queue while buildable.
      waitingDurationMillis - How long spent in the queue while waiting.
  • Method Details

    • getQueuingDurationMillis

      @Exported(visibility=1) public long getQueuingDurationMillis()
      Returns the duration this Run spent queuing, that is the wall time from when it entered the queue until it left the queue.
      Returns:
      the duration this Run spent queuing
    • getBlockedDurationMillis

      @Exported(visibility=2) public long getBlockedDurationMillis()
      Returns the duration this Run spent in the queue because it was blocked.
      Returns:
      the duration this Run spent in the queue because it was blocked.
    • getBuildableDurationMillis

      @Exported(visibility=2) public long getBuildableDurationMillis()
      Returns the duration this Run spent in the queue in a buildable state.
      Returns:
      the duration this Run spent in the queue in a buildable state.
    • getWaitingDurationMillis

      @Exported(visibility=2) public long getWaitingDurationMillis()
      Returns the duration this Run spent in the queue waiting before it could be considered for execution.
      Returns:
      the duration this Run spent in the queue waiting before it could be considered for execution.
    • isHasSubTasks

      public boolean isHasSubTasks()
    • getQueuingTimeMillis

      @Exported(visibility=1) public long getQueuingTimeMillis()
      Returns the total time this Run spent queuing, including the time spent by subtasks. This is the sum of getQueuingDurationMillis() plus all the SubTaskTimeInQueueAction.getQueuingDurationMillis().
      Returns:
      the total time this Run spent queuing
    • getBlockedTimeMillis

      @Exported(visibility=2) public long getBlockedTimeMillis()
      Returns the total time this Run, and any associated SubTasks, spent in the queue because they were blocked.
      Returns:
      the total time this Run, and any associated SubTasks, spent in the queue because they were blocked.
    • getBuildableTimeMillis

      @Exported(visibility=2) public long getBuildableTimeMillis()
      Returns the total time this Run, and any associated SubTasks, spent in the queue in a buildable state.
      Returns:
      the total time this Run, and any associated SubTasks, spent in the queue in a buildable state.
    • getWaitingTimeMillis

      @Exported(visibility=2) public long getWaitingTimeMillis()
      Returns the total time this Run, and any associated SubTasks, spent in the queue waiting before it could be considered for execution.
      Returns:
      the total time this Run, and any associated SubTasks, spent in the queue waiting before it could be considered for execution.
    • getExecutingTimeMillis

      @Exported(visibility=2) public long getExecutingTimeMillis()
      Returns the duration this Run spent building, that is the wall time from when it left the queue until it was finished.
      Returns:
      the duration this Run spent building
    • getBuildingDurationMillis

      @Exported(visibility=2) public long getBuildingDurationMillis()
    • getTotalDurationMillis

      @Exported(visibility=1) public long getTotalDurationMillis()
      Returns total duration for this Run, that is the wall time from when it entered the queue until it was finished.
      Returns:
      total duration for this Run, that is the wall time from when it entered the queue until it was finished.
    • getExecutorUtilization

      @Exported(visibility=2) public double getExecutorUtilization()
    • getSubTaskCount

      @Exported(visibility=2) public int getSubTaskCount()
    • getRun

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public Run getRun()
    • getQueuingDurationString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getQueuingDurationString()
    • getQueuingTimeString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getQueuingTimeString()
    • getBlockedTimeString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getBlockedTimeString()
    • getBuildableTimeString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getBuildableTimeString()
    • getWaitingTimeString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getWaitingTimeString()
    • getBlockedDurationString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getBlockedDurationString()
    • getBuildableDurationString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getBuildableDurationString()
    • getWaitingDurationString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getWaitingDurationString()
    • getExecutingTimeString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getExecutingTimeString()
    • getBuildingDurationString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getBuildingDurationString()
    • getTotalDurationString

      @Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public String getTotalDurationString()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • onAttached

      public void onAttached(Run<?,?> r)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Specified by:
      onLoad in interface RunAction2