#[non_exhaustive]pub enum Policy {
CargoLike,
LongestPath,
}Expand description
Which unit a scheduler picks when several are ready and one executor is free.
More policies may be added, so callers must not assume the set is closed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CargoLike
Cargo’s own ordering, which is blind to how long anything takes.
A unit’s priority is one plus the number of units that transitively depend on it. This is what Cargo does — it gives every unit the same fixed cost and adds up the costs of the transitive reverse-dependencies — and reproducing it is what makes the simulated makespan an estimate of Cargo’s wall time rather than of a better build system’s.
LongestPath
The longest remaining path to a sink first, the standard critical-path heuristic.
Schedules better than Cargo does. It is offered so that the gap between the two can be read off: that gap is what is lost to the ordering alone, as opposed to the shape of the graph.
Trait Implementations§
impl Copy for Policy
Source§impl Default for Policy
impl Default for Policy
Source§fn default() -> Self
fn default() -> Self
Policy::CargoLike, because the question the tool is asked is how long this build
takes, not how long an ideally scheduled one would.