Home Developer 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

Free Codacy Pro account to fight COVID-19

Our hearts go out to everyone who has been directly or indirectly impacted by the global coronavirus (COVID-19) pandemic. We are committed...

Introducing GitHub Apps for improved user access control

We are very excited to announce our recent migration to GitHub Apps to improve the experience of GitHub Cloud users. Now, you...

How Agile & Container Technology led to the rise of enterprise DevSecOps

New development processes and open-source technologies have shifted the technology security landscape for enterprises. Previously a separate security department often dealt with...

Spring tech events with Codacy: Coverage & what's next

Although many Spring tech events are being canceled or turning virtual due to coronavirus we are fortunate to have already participated in...

Top 6 items for your code review checklist

At Codacy we set high standards, and care about the quality of the code we produce. In order to provide optimal experiences...