论文标题

采矿代码审查数据以了解接受和合并之间的等待时间:经验分析

Mining Code Review Data to Understand Waiting Times Between Acceptance and Merging: An Empirical Analysis

论文作者

Kudrjavets, Gunnar, Kumar, Aditya, Nagappan, Nachiappan, Rastogi, Ayushi

论文摘要

增加代码速度(或审查和合并代码更改的速度)是加快开发并有助于工程师的工作满意度的组成部分。尽管过去已经研究了影响代码变化接受的因素,但降低代码审查寿命的解决方案的理解较低。这项研究调查了代码审查过程,以量化延迟和调查可能提高代码速度的机会。我们研究了从第一个响应开始的Gerrit和Phabricator上托管的半百万代码评论的时间特征,到接受或拒绝更改的决定,直到更改合并为目标分支为止。我们确定了两种类型的时间延迟:(a)代码提案的等待时间更改直到首先响应,以及(b)接受和合并之间的等待时间。我们的研究表明,减少接受和合并之间的时间有可能加快Phabricator代码审查的速度29-63%。小型代码更改和作者进行了大量先前接受的代码审查的更改,而没有代码审查迭代,就有更高的机会立即被接受。我们的分析表明,从手册转换为自动合并可以帮助提高代码速度。

Increasing code velocity (or the speed with which code changes are reviewed and merged) is integral to speeding up development and contributes to the work satisfaction of engineers. While factors affecting code change acceptance have been investigated in the past, solutions to decrease the code review lifetime are less understood. This study investigates the code review process to quantify delays and investigate opportunities to potentially increase code velocity. We study the temporal characteristics of half a million code reviews hosted on Gerrit and Phabricator, starting from the first response, to a decision to accept or reject the changes, and until the changes are merged into a target branch. We identified two types of time delays: (a) the wait time from the proposal of code changes until first response, and (b) the wait time between acceptance and merging. Our study indicates that reducing the time between acceptance and merging has the potential to speed up Phabricator code reviews by 29-63%. Small code changes and changes made by authors with a large number of previously accepted code reviews have a higher chance of being immediately accepted, without code review iterations. Our analysis suggests that switching from manual to automatic merges can help increase code velocity.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源