Interface BuildDurationCalculator
-
- All Known Implementing Classes:
BuildDurationCalculatorDelegate,WeightedAverageBuildDurationCalculator,WeightedAverageMSDBuildDurationCalculator
public interface BuildDurationCalculatorResponsible for calculating build duration estimates- Author:
- Sergey.Anchipolevsky Date: 05.06.2007
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longcalculateAgentBuildDuration(String buildTypeId, BuildAgent agent)Calculates estimated duration of a build of the specified build type on the specified agent considering only the time build spent on agent.longcalculateBuildDuration(String buildTypeId)Calculates estimated duration of a build of the specified build type.longcalculateBuildDuration(String buildTypeId, BuildAgent agent)Calculates estimated duration of a build of the specified build type on the specified agent.longestimateTimeLeftFor(RunningBuildEx build, long timestamp)Estimates time for the given build to complete from the given (timestamp) pivotbooleanhasDataForAgent(String buildTypeId, BuildAgent agent)
-
-
-
Method Detail
-
calculateBuildDuration
long calculateBuildDuration(@NotNull String buildTypeId, @NotNull BuildAgent agent)Calculates estimated duration of a build of the specified build type on the specified agent.- Parameters:
buildTypeId- build type id.agent- build agent.- Returns:
- Estimated time in milliseconds. -1 if an estimate cannot be calculated for some reason (e.g. lack of historical data).
-
calculateAgentBuildDuration
long calculateAgentBuildDuration(@NotNull String buildTypeId, @NotNull BuildAgent agent)Calculates estimated duration of a build of the specified build type on the specified agent considering only the time build spent on agent.- Parameters:
buildTypeId- build type id.agent- build agent.- Returns:
- Estimated time in milliseconds. -1 if an estimate cannot be calculated for some reason (e.g. lack of historical data).
-
calculateBuildDuration
long calculateBuildDuration(@NotNull String buildTypeId)Calculates estimated duration of a build of the specified build type.- Parameters:
buildTypeId-- Returns:
- Estimated time in milliseconds. -1 if an estimate cannot be calculated for some reason (e.g. lack of historical data).
-
hasDataForAgent
boolean hasDataForAgent(@NotNull String buildTypeId, @NotNull BuildAgent agent)- Parameters:
buildTypeId- build type idagent- agent- Returns:
- true if calculator has data for specified build configuration and agent (i.e. build of specified build configuration has been executed on the specified agent).
-
estimateTimeLeftFor
long estimateTimeLeftFor(@NotNull RunningBuildEx build, long timestamp)Estimates time for the given build to complete from the given (timestamp) pivot- Parameters:
build- target buildtimestamp- pivot to base estimate upon- Returns:
- estimation for the time left until completion
-
-