Spunk Autos

Websites and web tools

CI/CD Pipelines by the Numbers

A continuous integration and delivery pipeline builds, tests and ships code automatically. You can judge it with a handful of numbers you calculate from your own history, no industry benchmarks required. This page defines those numbers and works through an example for a small team.

Four delivery measures

The DORA research programme popularised four measures of software delivery. You can compute all of them from your own deploy log and incident notes.

MeasureDefinition
Deployment frequencyHow often you deploy to production
Lead time for changesTime from a commit to that commit running in production
Change failure rateShare of deployments that cause a failure needing a fix or rollback
Time to restoreHow long it takes to recover from a failed deployment

Pipeline duration

Developers wait on the pipeline every time they push. Duration is the sum of the stages that run one after another, so the fastest gains usually come from running independent stages in parallel.

Other numbers worth tracking

  • Queue time: how long a job waits for a free runner before it starts.
  • Flaky test rate: tests that fail and then pass on rerun with no code change.
  • Cache hit rate for dependencies and build outputs.
  • Main branch red time: how long the main branch stays broken.
  • Cost per run, if you pay for build minutes.

Collecting the numbers

  1. Export run history from your CI system, most offer an API or CSV.
  2. Tag production deploys with the commit SHA and timestamp.
  3. Record each incident with the deploy that caused it and the time it was resolved.
  4. Put the results in a simple spreadsheet and review them once a month.
  5. Change one thing at a time so you can see what moved the number.

How the numbers get misused

Any metric becomes a target that people can game. Deployment frequency rises if you split one change into ten tiny deploys. Change failure rate falls if nobody reports failures. Use the numbers to find bottlenecks, not to rank people, and look at them together: faster deploys are only good if failures and restore time do not climb at the same time.

Quick wins for slow pipelines

  • Cache dependency installs between runs.
  • Run only affected tests on pull requests and the full suite on merge.
  • Fail fast: put the quickest checks first.
  • Build container images once and promote the same image through environments.