Estimate total CI build duration from stage times, parallelism and queue delay.
A typical Jenkins build pipeline runs checkout, compile, test, package, and deploy stages back-to-back, but the test stage is the one most commonly parallelized across multiple executors. Total duration is the sum of every stage's time, with the test stage's contribution reduced by dividing its sequential time by the parallelism factor — making it the highest-leverage stage to optimize when a build is too slow.
totalDuration = checkout + compile + (testTime / parallelism) + package + deploy
Test suites are the most naturally parallelizable stage (independent test classes/files can run concurrently across executors), while checkout, compile, package, and deploy are typically single-threaded or already internally optimized (e.g. incremental compilation) rather than split across build agents.
It's bounded by both available executors and how well the test suite splits — 4–8x speedup is common with balanced test splitting, though diminishing returns and coordination overhead usually prevent linear scaling much beyond that.
Use incremental/cached builds (e.g. Gradle build cache, ccache for native code), warm dependency caches on the agent, and avoid clean builds unless necessary.