Skip to main content
Cloud DevOps Solutions
Get a quote Talk to an engineer

CI/CD Pipelines

CI/CD Performance Benchmarks: Measuring Build Time Before and After

A CI/CD performance benchmark measures how long your pipeline takes before changes, applies fixes one at a time, and measures again under comparable conditions. We report median and 95th percentile duration, queue time, failure rate and runner cost, so improvements are demonstrated with your own data rather than generic claims.

Key takeaways

  • You cannot claim an improvement without a baseline captured before any change.
  • Use median and 95th percentile, not averages, and separate queue time from run time.
  • Change one thing at a time, so you know which change produced which gain.
  • Some changes do not help. Reporting those honestly is part of the value.
  • Speed is not the only target: cost, reliability and developer wait time matter as well.

Why “it feels faster” is not good enough

Pipeline speed work is full of anecdotes. Someone adds a cache and says builds are quicker. A week later a large dependency update lands and they feel slow again. Without measurement, you cannot tell whether the cache helped, whether a runner change hurt, or whether the numbers moved because of unrelated factors such as load and test growth.

A benchmark turns opinion into evidence. It also helps a CTO decide whether further investment is worth it. This page describes how we run before and after comparisons as part of our CI/CD pipeline engagements, and what honest reporting looks like. We do not publish generic claims about how much faster pipelines get, because results depend entirely on your starting point.

What good measurement looks like

  • A baseline taken first. Data from before any change, covering enough runs to include slow days and big changes.
  • The right statistics. Median for the typical case, 95th percentile for the painful case.
  • Components separated. Queue time, setup time, build, test and deploy are measured individually.
  • One change at a time. Each optimisation has its own measurement.
  • Comparable conditions. Cold and warm cache runs are never mixed in one comparison.
  • Cost included. Faster is only better if you know what it cost.

What we measure

MetricWhy it matters
Median pull request check durationThe typical wait a developer experiences
p95 durationThe slow runs people remember and complain about
Queue timeWaiting for a runner, a capacity problem rather than a code problem
Time per stage and stepLocates the critical path
Failure rate excluding genuine test failuresInfrastructure flakiness and unreliable tests
Retry rateHidden cost of flakiness
Cache hit rateWhether caches actually work
Runner minutes and costThe price of speed
Merge to production timeEnd-to-end lead time, an important DORA measure

The last item connects pipeline speed to delivery performance. Lead time, deployment frequency, change failure rate and time to restore are the four DORA metrics. They are useful as trends. They are not a scoreboard to rank engineers.

How we collect data

Most CI platforms expose what we need. GitHub provides workflow run and job data through its API, GitLab provides pipeline and job timings, and Jenkins exposes build data and metrics through plugins. A short script can pull this into a spreadsheet or database. For example, listing recent workflow runs with GitHub’s CLI and computing durations:

gh run list --workflow ci.yml --limit 200 \
  --json databaseId,createdAt,updatedAt,conclusion,event \
  | jq -r '.[] | select(.event=="pull_request")
      | [.databaseId, .conclusion,
         ((.updatedAt|fromdateiso8601) - (.createdAt|fromdateiso8601))]
      | @csv'

createdAt to updatedAt approximates total run time including queueing, so for finer detail we pull per-job startedAt and completedAt values. The output feeds a median and p95 calculation. For ongoing monitoring, we send pipeline events to Prometheus and chart them in Grafana, as described in our dashboard work, so the benchmark becomes a permanent view rather than a one-off report.

Finding the critical path

A pipeline is a graph of jobs. Total duration equals the longest path through it. Speeding up a job that runs in parallel with a longer one achieves nothing.

We draw the graph with measured durations, then attack the longest path first. Typical findings:

  • A single slow end-to-end test job dominating everything else, which suggests sharding or moving it off the pull request path.
  • Long setup phases dominated by dependency downloads and image builds, which suggests caching.
  • Queue time exceeding run time, which points at runner capacity rather than the pipeline.
  • Serial jobs that do not depend on each other and could run side by side.
  • Heavy jobs running on every change when path filters could skip them.

Running the experiment properly

For each optimisation:

  1. State the hypothesis (“caching npm will save about two minutes of install time”) before the change.
  2. Ship the change on its own, ideally on a branch run against recent commits for a controlled comparison.
  3. Compare equivalent runs: similar change sizes, same runner type, and the same cache state.
  4. Look at the median and p95, and at failure rate, since a faster but flakier pipeline is not an improvement.
  5. Keep, adjust or revert the change based on the result.

A subtle trap is regression to the mean: a measured improvement over a few lucky runs. We use enough runs and look at the distribution, not individual numbers. Another is the “cold start” illusion, where the first run after a cache change is slow and the next is fast. We record both.

Decisions and trade-offs

Speed versus cost. Larger runners and more shards cut wall-clock time and may raise spend. A fair report shows both so you can decide whether five minutes of developer waiting is worth the extra runner cost. For a large team it often is.

Speed versus coverage. The quickest way to a fast pipeline is to test less. We do not recommend that for production paths. We prefer moving slow, low-value tests to scheduled runs and keeping critical checks on every pull request.

Hosted versus self-hosted runners. Self-hosted runners may be faster per job on better hardware, but add maintenance. We benchmark both for your heaviest jobs before recommending a change.

When the benchmark says do nothing. If your median check time is already modest, queue time is low and failures are rare, the right advice is to leave it alone and put effort elsewhere. We would rather say that than sell work.

Common failure modes

  • No baseline, so improvement cannot be shown.
  • Averages that hide slow runs.
  • Measuring warm runs only.
  • Changing many things at once, so nobody knows what worked.
  • Ignoring queue time, and blaming the pipeline for a capacity shortage.
  • Optimising a non-critical job.
  • Reporting cherry-picked best runs.

Delivery and handover

You receive a report with the baseline, each change we made and its measured effect, the methodology (so your engineers can reproduce it), and a ranked list of remaining opportunities. The collection scripts and dashboards are left in your repositories. If your migration from another CI system is part of the work, the same method gives a fair comparison, which we apply in our Jenkins migration approach.

How to tell it is working

The sign that this approach works is that numbers keep being collected after we leave. Median and p95 check durations stay inside agreed bounds, regressions are noticed within days rather than quarters, and slowdowns trigger a conversation. If you would like a baseline for your pipeline, book a consultation and we will start with the data.

References

How we deliver it

  1. 01

    Instrument the pipeline

    We collect duration per job and step, queue time, retries, cache results and runner type from your CI platform's API or logs.

  2. 02

    Capture a baseline

    Several weeks of real runs (or a representative sample) establish medians, p95 values, failure rate and cost before any change.

  3. 03

    Find the critical path

    We identify which jobs and steps determine total duration, since speeding up work off the critical path changes nothing.

  4. 04

    Change one thing at a time

    Each optimisation (cache, shard, runner size, Dockerfile change) is shipped and measured separately, ideally with a control.

  5. 05

    Compare like with like

    Results are compared on equivalent workloads, accounting for cold caches, load and unusually large changes.

  6. 06

    Report and set targets

    You receive a before and after report with methodology, honest caveats and a short list of next steps ranked by payoff.

Tools and technologies

GitHub Actions APIGitLab CI analyticsJenkins metricsPrometheusGrafanaDatadog CI VisibilityBuildKitJUnit XMLjqTrivy

Frequently asked questions

How do you benchmark a CI pipeline fairly?
Capture a baseline from real runs before changing anything, then change one variable at a time and compare equivalent runs. Use median and 95th percentile rather than averages, report queue time separately from execution time, and account for cache state, because a warm cache run and a cold one are not comparable.
What is a good CI build time?
There is no universal number. A useful guide is whether developers stay in flow while waiting: pull request checks measured in single-digit minutes are generally comfortable, and much longer tends to change behaviour. The right target depends on your product, risk and test depth, so we set one against your baseline.
Why use median and p95 instead of the average?
Pipeline durations are skewed by occasional very slow runs, so the average misleads. The median shows the typical experience, and the 95th percentile shows how bad the slow runs are. Developers remember the slow ones, so p95 often matters more to perceived speed.
How much faster can you make our pipeline?
We cannot promise a figure before seeing your data. Gains depend on how much repeatable work you do, test design, runner size and queueing. We measure first, then estimate from the critical path. If the pipeline is already well tuned, we will say so rather than invent improvement.
Does a faster pipeline always cost less?
Not always. Parallel shards and bigger runners can shorten wall-clock time while keeping total compute similar or higher. Caching and skipping unnecessary work usually reduce both. We report cost alongside duration, so you can choose where to trade money for developer time.

Talk to an engineer about ci/cd build time benchmark

Book a free 30-minute call. We review your current setup and tell you honestly whether and how we can help.

Written by Saddique Khan, DevOps / SRE / Cloud Consultant Engineer. Last updated 2026-10-08.