Skip to content

0004 remove eager strategy

nehashri edited this page Sep 25, 2017 · 1 revision

4. Remove Eager strategy

This ADR has been recorded retrospectively.

Status

Proposed

Context

Parallel execution creates sub groups of specs to be executed by each runner spawned for parallel execution. This is eager strategy where the spec to be executed by each runner process is predefined by gauge.
However this is not an optimal solution as execution time of a spec varies. Some groups may take longer than others to finish. Hence, there would be some runner processes running for a long time while others are idle.

Decision

Introduce Lazy execution strategy where specs to be executed by each runner is not predefined. As and when a runner finishes execution of a spec, it asks gauge for a new spec to be run. Gauge then gives it a spec to be executed from the spec collection. The older eager execution strategy has to be removed.

Consequences

As each runner gets a new spec only after it has finished execution of the previous one, there aren't may runner processes idle when there are specs to be run. This also drastically improves the execution time for parallel runs.