Calculate how often a CI/CD pipeline fails across recent runs to spot flakiness.
A single overall failure rate hides where a pipeline is actually breaking, so this calculator also breaks total failures down by the stage they occurred in (build, test, or deploy) to identify which one deserves the most remediation attention. The stage with the most absolute failures is flagged as the bottleneck — teams chasing a lower failure rate get the most leverage by fixing that stage first rather than spreading effort evenly across all three.
failureRate = (buildFailures + testFailures + deployFailures) / totalRuns × 100
Test stages exercise the most code paths and are the intended place to catch regressions, so a healthy pipeline actually expects more failures there than in build/deploy — high test-stage failure share isn't necessarily bad if it's catching real bugs before they reach later stages.
Since code has already passed build and test by the time it reaches deploy, deploy failures often point to environment drift, missing infrastructure permissions, or deployment script/config issues rather than code correctness problems.
Yes — blending failure rates across a fast-iterating feature-branch pipeline and a strict main-branch release pipeline obscures both; tracking them separately gives a much clearer signal of release-readiness versus day-to-day development friction.