Home Developer Visualizing pull request lifespan vs programming languages

Visualizing pull request lifespan vs programming languages

Author

Date

Category

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?


https://dl.dropboxusercontent.com/u/3509093/Charts/chart.html

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.


Process

  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:

https://dl.dropboxusercontent.com/u/3509093/Charts/chartPopular.html

What if, however, we reduce the restriction of at least 3000 pull requests?

https://dl.dropboxusercontent.com/u/3509093/Charts/chartAll.html

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.

Conclusion

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.

GET STARTED

LEAVE A REPLY

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

New Public Product Roadmap – See What's In Store For Q1

With our new public product roadmap check out what we have in store for Q1

4 Trends To Boost Software Quality in 2020

Today’s abundance of technology has created an increased demand for higher software quality. With companies aware of this, spending on IT worldwide...

7 Reasons Dev Teams Choose Codacy Over Other Automated Code Review Tools

Today more than 100,000 developers at leading global organizations like PayPal and Adobe across industries use Codacy (read customer case studies). ...

Introducing GitHub Sync For Seamless User Management

Announcing GitHub Sync: Synced Organizations For GitHub We are thrilled to announce "GitHub Sync" -- automatic user and repository...

Ringing In 2020 With Codacy

It’s been an exciting 2019 at Codacy and we expect more excitement in 2020. Over the last 12 months we’ve built out...