Interface BuildDurationCalculator
-
- All Known Implementing Classes:
BuildDurationCalculatorDelegate
,WeightedAverageBuildDurationCalculator
,WeightedAverageMSDBuildDurationCalculator
public interface BuildDurationCalculator
Responsible 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 long
calculateAgentBuildDuration(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.long
calculateBuildDuration(String buildTypeId)
Calculates estimated duration of a build of the specified build type.long
calculateBuildDuration(String buildTypeId, BuildAgent agent)
Calculates estimated duration of a build of the specified build type on the specified agent.long
estimateTimeLeftFor(RunningBuildEx build, long timestamp)
Estimates time for the given build to complete from the given (timestamp) pivotboolean
hasDataForAgent(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
-
-