Metric Definition
Where changes stall before merge
Track from
Pull request bottleneck analysis
Pull request bottleneck analysis breaks the time a change spends from open to merge into distinct stages, then identifies the stage where time accumulates fastest. It pinpoints the single slowest step in code review rather than reporting one blended duration. The result tells a team exactly where to intervene to ship faster.
9 min read
What is pull request bottleneck analysis?
Pull request bottleneck analysis breaks the time a change spends from open to merge into distinct stages, then identifies the stage where time accumulates fastest. Instead of reporting that a request takes three days to merge, it tells you that two of those days are spent waiting for a first review and the rest is split between active review and the final merge. The bottleneck is the stage holding the largest share of total lead time.
This matters because a single blended duration hides where the problem actually lives. Two teams can both average three days to merge, yet one is slow because reviews are thorough and the other is slow because requests sit untouched in a queue for two days before anyone looks. The fix is completely different. Bottleneck analysis exists to separate these cases so that effort goes to the stage that is genuinely holding work back.
The analysis is most useful as an ongoing diagnostic rather than a one-off audit. The bottleneck moves. Solve the first-review wait and the constraint shifts to active review, or to a slow check suite, or to the merge step. Tracking the share of time in each stage over time shows the constraint migrating and confirms whether a change actually relieved it.
A bottleneck is the stage with the highest share of total lead time, not simply the stage with a long absolute duration. A two-day review is fine if it reflects careful scrutiny of a large change. The same two days spent waiting in a queue with nobody assigned is pure delay, and only stage-level analysis tells the two apart.
How to calculate pull request bottleneck analysis
There is no single formula, because the analysis is about decomposition. You split total lead time into ordered stages, measure the time spent in each, and express each as a share of the whole. The stage with the largest share is the current bottleneck. The inputs below are the stages most teams should measure.
- 1
Wait for first review
Time from the request opening to the first reviewer engaging. This stage is almost always pure queue time, and on most teams it is the largest hidden delay.
- 2
Active review time
Time spent in back-and-forth review, including the author addressing comments. Long durations here can be legitimate scrutiny or unproductive churn, so it is read alongside the number of review rounds.
- 3
Wait for merge
Time between final approval and the request actually merging. Delays here usually come from check suites, merge queues, or branch conflicts rather than from people.
- 4
Check suite duration
How long automated tests and builds take to complete on each push. Slow checks inflate both active review and wait for merge, and a slow suite can be the real constraint hiding behind two other stages.
Measuring shares rather than raw durations is what makes the analysis actionable. If wait for first review is 60 percent of lead time, the constraint is reviewer assignment, and speeding up the check suite will barely help. If wait for merge dominates, the people are fine and the pipeline is the problem. This stage view is the missing layer beneath blended metrics like cycle time, which tells you the total but not where it was spent.
Pull request bottleneck analysis in a metric tree
A metric tree decomposes total pull request lead time into the stages that make it up and then into the operational causes of delay within each stage. This is what turns a blended duration into a clear answer about where to act.
The first level splits lead time into wait for first review, active review, and wait for merge. Each stage then decomposes into the specific causes of delay. Wait for first review breaks into reviewer availability and assignment clarity. Active review breaks into request size and the number of review rounds. Wait for merge breaks into check duration and queue contention. Every leaf is a lever a specific owner can pull.
The tree makes the constraint visible and the response unambiguous. It shows not only which stage is the bottleneck but the cause inside that stage, so the team acts on the assignment process, the request size, or the check suite rather than on the symptom.
Metric tree insight
On most teams the wait for first review is the dominant bottleneck, and it is invisible in any blended duration. Work sits in a queue with nobody assigned, often longer than the active review itself. Automatic reviewer assignment and a clear turnaround expectation relieve this stage at almost no cost.
Pull request bottleneck analysis benchmarks
The useful benchmark is the distribution of time across stages, not a single target duration. A healthy pipeline spends most of its lead time in active review, because that is the stage where value is added. When waiting stages dominate, the pipeline has a constraint to remove.
| Stage holding the most time | Typical share of lead time | What it indicates |
|---|---|---|
| Wait for first review | 40 percent or more | A queue bottleneck. Requests sit unassigned. The fix is reviewer assignment and a turnaround expectation, not faster reviewing. |
| Active review | The largest share, with few rounds | Generally healthy. Time is going into substantive review. Confirm review rounds are low so this is scrutiny and not rework churn. |
| Active review | Large share, with many rounds | A rework bottleneck. Requests are too large or standards are unclear, so changes bounce repeatedly before approval. |
| Wait for merge | 25 percent or more | A pipeline bottleneck. Slow check suites or merge queue contention are the cause, and the fix is technical rather than about people. |
As a rough target, a healthy team keeps the wait for first review under a quarter of total lead time and spends most of the remainder in active review with one or two rounds. When this profile holds, sprint velocity and deployment frequency tend to follow, because completed work is reaching the main branch without sitting idle in a queue.
How to improve pull request bottleneck analysis
Improving flow means relieving the current bottleneck, confirming it moved, and then attacking the next one. Effort spent anywhere other than the constraint produces almost no improvement in total lead time, which is why naming the bottleneck first is the whole point.
Measure stages, not totals
Instrument the time a request spends waiting for review, in review, and waiting to merge separately. Without stage-level timing you are guessing at the constraint, and guessing usually points at the wrong stage.
Attack the wait for first review
Assign reviewers automatically and set a clear turnaround expectation. The first-review queue is the most common bottleneck and the cheapest to fix, since it is delay rather than work.
Speed up the check suite
When wait for merge dominates, parallelise tests, cache builds, and trim slow checks. A faster suite shrinks both the merge wait and the active review stage at once.
Shrink request size
When active review is slow with many rounds, smaller requests are the fix. They review faster, need fewer rounds, and move the constraint off the review stage entirely.
The metric tree approach makes this disciplined. You find the stage with the largest share of lead time, act on its dominant cause, and then watch the tree to confirm the constraint has shifted somewhere else. Solving the first-review queue only to find active review is now the bottleneck is success, not failure, because the total has dropped and the next target is clear.
KPI Tree lets you model lead time this way by connecting each stage to the part of the team that owns it. The engineering lead owns reviewer assignment and queue depth. Authors own request size and response time. Platform owns the check suite and merge queue. With RACI ownership on every node and a verified impact loop that checks whether a change actually moved the stage it targeted, bottleneck analysis stops being a chart and becomes a closed loop from constraint to action to confirmed result.
Common mistakes when tracking pull request bottleneck analysis
- 1
Optimising total lead time blindly
Pushing on the whole duration without finding the constraint wastes effort. Improving a stage that is not the bottleneck barely moves the total. Always locate the dominant stage first.
- 2
Confusing long review with delay
A long active-review stage can be healthy scrutiny of a complex change. Treating all long durations as waste leads teams to rush review, which trades delay for defects.
- 3
Ignoring the wait for first review
The queue before a reviewer engages is often the largest stage and the easiest to miss, because blended metrics fold it into review time. Measure it on its own.
- 4
Assuming the bottleneck is fixed
The constraint moves once you relieve it. Treating bottleneck analysis as a one-off audit means the next constraint goes unnoticed. It is an ongoing measurement.
- 5
Blaming people for pipeline delays
A slow merge stage is usually checks or queue contention, not reviewer effort. Attributing pipeline delay to individuals points the response at the wrong owner entirely.
Related metrics
Cycle time
Process speed
Operations MetricsMetric Definition
Cycle Time = Process End Time − Process Start Time
Cycle time measures the total elapsed time from the start to the end of a process. It is a fundamental operations metric used in manufacturing, software development, service delivery, and any context where the speed of a process directly affects throughput, cost, and customer satisfaction.
Deployment frequency
DORA metric
Operations MetricsMetric Definition
Deployment Frequency = Number of Production Deployments / Time Period
Deployment frequency measures how often an organisation successfully releases code to production. It is one of the four DORA (DevOps Research and Assessment) metrics that predict software delivery performance and organisational outcomes. Teams that deploy more frequently deliver value to users faster, reduce the risk of each individual release, and create tighter feedback loops between development and production.
Sprint velocity
Agile planning metric
Operations MetricsMetric Definition
Sprint Velocity = Sum of Story Points Completed in a Sprint
Sprint velocity measures the amount of work a team completes during a sprint, typically expressed in story points, ideal days, or another unit of estimation. It is a planning tool that helps agile teams forecast how much work they can commit to in future sprints based on their historical completion rate. Velocity is one of the most widely used and most frequently misunderstood metrics in agile software development.
Why did my metric change? A diagnostic framework
Metric Definition
When pull requests start stalling longer before merge, this diagnostic framework helps you trace which stage of the review process is driving the change.
Metric trees for engineering teams
Metric Definition
See how pull request bottleneck analysis fits into a wider engineering metric tree alongside the delivery and review metrics it depends on.
Find the stage where your changes actually stall
Build a lead-time metric tree that splits review into waiting and working stages, names the owner of each, and confirms whether a fix moved the constraint.