Interface BuildEstimator

  • All Known Implementing Classes:
    CachingBuildEstimator

    public interface BuildEstimator
    Responsible for estimating start / finish times for a build within the build queue. This is the main facade for the build estimation subsystem.
    Author:
    Sergey.Anchipolevsky Date: 08.06.2007
    • Method Detail

      • getEstimates

        @Nullable
        BuildEstimates getEstimates​(@NotNull
                                    QueuedBuildInfo queuedBuild)
        Returns an expected time interval (start/finish time) for the given queued build. The time interval can be open from the above (has start time, but doesn't have finish time). This may happen when the build duration cannot be predicted due to the lack of statistics. Also null may be returned if the build start time couldn't be estimated. This may happen for the following reasons:
        1. The build is not in the queue
        2. The build never can start because there are no compatible agents
        3. The build comes after another build (to the same agent) whose finish time cannot be estimated
        The time base for the returned time interval is the time of method invocation with some accuracy. This means that two calls for the same queued build will always return different objects.

        The returned objects are value objects, that is they never change their values. The relative times returned by TimePoint methods are calculated for the time when the object was obtained.

        The returned object refers to future events only. That is all the relative times are non-negative.

        Parameters:
        queuedBuild - represents a build in the queue
        Returns:
        the BuildEstimates object describing the expected start / finish times or null if the build couldn't be estimated.