Package hudson.model.queue
Class LoadPredictor
- java.lang.Object
-
- hudson.model.queue.LoadPredictor
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
LoadPredictor.CurrentlyRunningTasks
public abstract class LoadPredictor extends Object implements ExtensionPoint
Predicts future load to the system, to assist the scheduling decisionsWhen Hudson makes a scheduling decision, Hudson considers predicted future load — e.g., "We do currently have one available executor, but we know we need this for something else in 30 minutes, so we can't currently schedule a build that takes 1 hour."
This extension point plugs in such estimation of future load.
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LoadPredictor.CurrentlyRunningTasks
Considers currently running tasks and their completion.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description LoadPredictor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ExtensionList<LoadPredictor>
all()
All the registered instances.Iterable<FutureLoad>
predict(Computer computer, long start, long end)
Deprecated.as of 1.380 Usepredict(MappingWorksheet, Computer, long, long)
Iterable<FutureLoad>
predict(MappingWorksheet plan, Computer computer, long start, long end)
Estimates load starting from the 'start' timestamp, up to the 'end' timestamp.
-
-
-
Method Detail
-
predict
public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end)
Estimates load starting from the 'start' timestamp, up to the 'end' timestamp.- Parameters:
start
- Where to start enumeration. Always bigger or equal to the current time of the execution.plan
- This is the execution plan for which we are making a load prediction. Never null. While this object is still being partially constructed when this method is called, some of its properties (likeMappingWorksheet.item
provide access to more contextual information.- Since:
- 1.380
-
predict
@Deprecated public Iterable<FutureLoad> predict(Computer computer, long start, long end)
Deprecated.as of 1.380 Usepredict(MappingWorksheet, Computer, long, long)
Estimates load starting from the 'start' timestamp, up to the 'end' timestamp.- Parameters:
start
- Where to start enumeration. Always bigger or equal to the current time of the execution.
-
all
public static ExtensionList<LoadPredictor> all()
All the registered instances.
-
-