Dispatch time estimation for build farm jobs
Introduction
Please note that job dispatch times are estimated. Oh, did I already mention that job dispatch times are an estimation only?
For the purpose of this description a 'platform' is considered to be the combination of a
- processor (e.g. i386 or amd64) and a
- virtualization setting (one of: true, false or null)
Build farm jobs can either target a specific platform (e.g. binary builds) or be platform-independent (e.g. "generate a source package from a recipe" builds).
The former can only make use of build machines (or "builders" in Soyuz parlance) of the given platform while platform-independent jobs may run on any available builder.
Jobs with an unspecified virtualization setting will be dispatched to virtual builders only.
Builders can -- roughly speaking -- either be idle or building. For any job running on a particular builder its estimated duration and its start time is available allowing us to estimate the job's remaining execution time.
Given:
- a queue of pending (i.e. ready to build) build farm jobs sorted in descending order according to their score
- a pool of builders
Wanted: the estimated dispatch time for a specific job in the pending queue i.e. for the job of interest (aka JOI).