Parallel Stage Time Calculator
Estimate time savings from running pipeline stages in parallel versus sequentially.
About Parallel Stage Time Calculator
In a Jenkins declarative pipeline, stages inside a `parallel {}` block start together and the block doesn't complete until its slowest branch finishes — so the group contributes only its maximum branch duration to the critical path, not the sum of all branches. Total pipeline time is therefore the sum of sequential stage time plus that single slowest-branch duration, which is why balancing parallel branches to similar durations (rather than having one long outlier) yields the biggest time savings.
Formula
totalTime = sequentialStagesTotal + max(branch1, branch2, branch3)
- S
- Sequential stages total time in seconds
- P_1
- Parallel branch 1 duration in seconds
- P_2
- Parallel branch 2 duration in seconds
- P_3
- Parallel branch 3 duration in seconds
- T
- Total pipeline time in seconds
Worked example
With the default values below, Parallel Stage Time Calculator returns Total Pipeline Time of 190.0. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Sequential Stages Totalaccepts 0–86,400 sec
- 90 sec
- Parallel Branch 1 Durationaccepts 0–86,400 sec
- 60 sec
- Parallel Branch 2 Durationaccepts 0–86,400 sec
- 100 sec
- Parallel Branch 3 Durationaccepts 0–86,400 sec
- 45 sec
Results
- Total Pipeline Time
- 190.0 sec
- Parallel Group Time (Critical Path)
- 100.0 sec
- Time Saved vs. Fully Sequential
- 105.0 sec
Step by step
- 1Parallel group time = slowest branch= 100.0s
- 2Total = sequential + parallel group= 190.0s
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
What if one parallel branch is much slower than the others?
The whole parallel block still waits for that slowest branch, so the faster branches' executors sit idle after finishing — rebalancing work more evenly across branches (or giving the slow branch more resources) reduces the group's critical-path time.
Does adding more parallel branches always help?
Only if it reduces the slowest branch's duration; adding branches for unrelated work that doesn't shorten the critical path (or that saturates available executors, causing branches to queue rather than truly run concurrently) won't reduce total time.
Can parallel blocks be nested with more sequential stages?
Yes — pipelines commonly alternate sequential and parallel blocks; for multi-block pipelines, apply this same sum-of-sequential-plus-max-of-parallel logic to each block in turn along the overall stage sequence.
