The way pull requests are made, closed and merged has been intriguing me for a while.
Pull requests have slowly become the standard flow of operations for many teams shipping software products.Today I’ve asked myself: what is the average number of days to merge a pull request per programming language and how different is this average per language?
This chart represents average number of days pull requests life span (time since it is created until it’s merged) on March on Github grouped by programming languageThis first thing to notice is that there is not that big of a difference between different programming languages. I was honestly expecting a bigger gap between these.I believe this is due to the process of pull request code review being a standard short period.
In fact, the average time to merge (the time since the pull request was created until it was merged) of the analyzed pull requests is 2.5 days. This means that on average a pull request is taking 2 days and a half to close.It appears that HTML (with an average of 1.31 days to merge) and CSS (with 1.48) have a lower average than the rest of languages.
This appears to make sense since all fixes done should include less logic change than remaining languages.It is also interesting to see languages of approximate syntax being close together.
Take a look on how Java (1.61d) and C# (1.48d) are very close together. However, while Java includes a total of 43,863 pull requests under analysis, C# has 12,262 which speaks about the open source component of both languages.
- We extracted all pull requests from open sourced Github projects that ended in March from GithubArchive.org.
- We calculated for every pull request the average number of days since it was created to the moment it was merged (not closed).
- We filtered all the pull requests that started before 6 months ago.
- We grouped theses pull requests by programming language of their project and filtered all programming languages that had less than 3000 pull requests in their groups.
Knowing this, we can try to include of filter more information from the chart.
In the previous chart We have a few languages with less number of pull requests accounted for the analysis, if we remove these (Scala, Go, Objective-C, CoffeeScript) this is what our chart looks like:
What if, however, we reduce the restriction of at least 3000 pull requests?
The interesting aspect is Kotlin which is representing a time to merge at least 3 times bigger than the rest of programming languages.
Looking now at a set of 65 programming languages, one can’t help but awe how in sync people are shipping code. An average of 2.5 days with such a small apparent deviation is really fascinating.
We’ve seen the merging times of 400k pull requests and their programming languages.
We’ve seen how programming languages have very similar pull request lifespan with the exception of Kotlin.
An interesting analysis to follow up would be to find if these differences are the same month after month for closing pull requests.
What is your average time to merge?
Edit: We just published an ebook: “The Ultimate Guide to Code Review” based on a survey of 680+ developers. Enjoy!
Codacy is used by thousands of developers to analyze billions of lines of code every day!
Getting started is easy – and free! Just use your GitHub, Bitbucket or Google account to sign up.