Home Code Quality Code Reviews Visualizing pull request lifespan vs programming languages

Visualizing pull request lifespan vs programming languages




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.
C (2.31d) and C++ (2.46d) are also placing next to each other.It is interesting to see that Python takes almost 1 day longer to merge a pull request than Javascript.We can also take look at this in other ways (and there are certainly more programming languages to talk about). But first, let’s talk about the process to make this chart.


  1. We extracted all pull requests from open sourced Github projects that ended in March from GithubArchive.org.
  2. We calculated for every pull request the average number of days since it was created to the moment it was merged (not closed).
  3. We filtered all the pull requests that started before 6 months ago.
  4. 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.

Alternative views

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.
We’ve seen the average time to merge of pull requests made in Java, Javascript, PHP, Python, Ruby.. We’ve actually seen this for 65 different languages.
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!

About Codacy

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.



Please enter your comment!
Please enter your name here

Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.

Recent posts

How does code quality fit into your CI/CD pipeline?

Continuous Integration and Continuous Deployment (CI/CD) are key for organizations wanting to deliver software at scale. CI/CD allows developers to automate...

How Stim uses Codacy to achieve high-quality code

We spoke with Tobias Sjösten, Head of Software Engineering at Stim, about how Codacy helps them guarantee code quality and standardization...

6 things developers should do to ship more secure code

Writing better, more secure source code is fundamental to prevent potential exploits and attacks that could undermine your software applications. However,...

Best practices for security code reviews

In today's interconnected world, where data breaches and cyber threats are increasingly common, one of your top priorities should be to...

April Product Update 🚀

Hi there 👋 It's been a whirlwind month, and we have big news to share: