Classic Pull Request stats: how to optimize what matters for long-term health

The "Activity Stats" tab within our "Pull Requests" section offers our collection of pull request stats built to inform Managers and Leads about how their team is charting over weeks, months, or years.



The default featured graph in "Activity Stats" shows the sum of days that pull requests were opened for label. You can change the featured graph by clicking the title of any of the secondary charts shown below this featured chart

The default featured Pull Request graph shows which of your pull requests have been lingering the longest over the given time interval. The reason this was chosen as the default is that it is a best practice to close pull requests within 2-4 weeks of their having been opened. By stacking the number of days that each of the longest-open pull requests have lingered, this graph creates a heavy incentive for teams to close out their pull requests, thus reducing their Cycle Time (read more about how we that, below!).


The featured graph can be adjusted by the user by clicking on the smaller graphs that reside in the next section:


Three more featured graph options, available by clicking a title

The most useful of these graphs is arguably Diff Delta by PR stage:


Upon clicking the title for the chart, it becomes the featured chart, which reveals its labels and date range

In general, the more time that the team is spending in the PR Preparing state, and the less time they are spending in the Post-merge (i.e., bug fixing) state, the happier the developers.


linkClassic Pull Request Stat boxes

Beneath the featured graph, we show five boxes that answer common questions posed by managers and developers:


When navigating your own data, each stat will offer more information on how it was calculated upon being hovered


According to Google DORA and others, Cycle Time should be one of the primary metrics that a team seeks to reduce in pursuit of being able to respond more quickly once they decide what they want to work on. Hovering on the tooltip for Cycle Time will reveal the data that we used to calculate this stat, so you're not left in the dark wondering about which data was used for the calculation. "Cycle Time" in the context of the Pull Request stats means, "how much time passed between the first commit for the PR and when it was merged?"


Open to closed time illustrates the average duration of time between when a pull request was opened for review and when it was closed. Teams usually want this to be considerably shorter than their Cycle Time, otherwise that indicates that most of the time for the PR is being spent in a back-and-forth during the PR review process.


Diff Delta per PR gives a manager a sense for whether the team is succeeding in pursuit of submitting small, easily digestable pull requests. By default, GitClear suggests that most pull requests should be 1,000 Diff Delta or less, since the average committer accrues around 100-200 Diff Delta per day, implying that a PR of greater than 1,000 Diff Delta was probably worked on longer than a week, which gets to be a lot of code to review. Managers can configure their own target value for "Diff Delta per PR" in their settings.


PRs posted count. How many pull requests were opened during the selected time window?


PRs merged count. How many PRs have a closed_at date in this interval and a PR status of "merged."