Understanding why we cannot model how long a code review will take: an industrial case study

Lawrence Chen, Peter C. Rigby, Nachiappan Nagappan
{"title":"Understanding why we cannot model how long a code review will take: an industrial case study","authors":"Lawrence Chen, Peter C. Rigby, Nachiappan Nagappan","doi":"10.1145/3540250.3558945","DOIUrl":null,"url":null,"abstract":"Code review is an effective practice for finding defects, but because it is manually intensive it can slow down the continuous integration of changes. Our goal was to understand the factors that influenced the time a change, ie a diff at Meta, would spend in review. A developer survey showed that diff reviews start to feel slow after they have been waiting for around 24 hour review. We built a review time predictor model to identify potential factors that may be causing reviews to take longer, which we could use to predict when would be the best time to nudge reviewers or to identify diff-related factors that we may need to address. The strongest feature of the time spent in review model we built was the day of the week because diffs submitted near the weekend may have to wait for Monday for review. After removing time on weekends, the remaining features, including size of diff and the number of meetings the reviewers have did not provide substantial predictive power, thereby not being able to predict how long a code review would take. We contributed to the effort to reduce stale diffs by suggesting that diffs be nudged near the start of the workday and that diffs published near the weekend be nudged sooner on Friday to avoid waiting the entire weekend. We use a nudging threshold rather than a model because we showed that TimeInReview cannot be accurately modelled. The NudgeBot has been rolled to over 30k developers at Meta.","PeriodicalId":68155,"journal":{"name":"软件产业与工程","volume":"42 1 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2022-11-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"软件产业与工程","FirstCategoryId":"1089","ListUrlMain":"https://doi.org/10.1145/3540250.3558945","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3

Abstract

Code review is an effective practice for finding defects, but because it is manually intensive it can slow down the continuous integration of changes. Our goal was to understand the factors that influenced the time a change, ie a diff at Meta, would spend in review. A developer survey showed that diff reviews start to feel slow after they have been waiting for around 24 hour review. We built a review time predictor model to identify potential factors that may be causing reviews to take longer, which we could use to predict when would be the best time to nudge reviewers or to identify diff-related factors that we may need to address. The strongest feature of the time spent in review model we built was the day of the week because diffs submitted near the weekend may have to wait for Monday for review. After removing time on weekends, the remaining features, including size of diff and the number of meetings the reviewers have did not provide substantial predictive power, thereby not being able to predict how long a code review would take. We contributed to the effort to reduce stale diffs by suggesting that diffs be nudged near the start of the workday and that diffs published near the weekend be nudged sooner on Friday to avoid waiting the entire weekend. We use a nudging threshold rather than a model because we showed that TimeInReview cannot be accurately modelled. The NudgeBot has been rolled to over 30k developers at Meta.
理解为什么我们不能对代码审查所需的时间建模:一个工业案例研究
代码审查是一种发现缺陷的有效实践,但是因为它是人工密集型的,它会减慢变更的持续集成。我们的目标是了解影响变更(即Meta的差异)在审查中花费的时间的因素。一项开发者调查显示,在等待了大约24小时的审查后,diff审查开始感到缓慢。我们建立了一个评审时间预测模型来识别可能导致评审花费更长时间的潜在因素,我们可以用它来预测何时是推动评审人员的最佳时间,或者识别我们可能需要处理的不同相关因素。在我们构建的评审模型中所花费时间的最大特征是一周中的某一天,因为在周末附近提交的差异可能要等到周一才能进行评审。在去掉周末的时间后,剩下的特性,包括差异的大小和审稿人的会议次数,并没有提供实质性的预测能力,因此无法预测代码审查需要多长时间。我们通过建议在工作日开始时发布差异,以及在周末发布的差异在周五早些时候发布,以避免等待整个周末,从而为减少陈旧的差异做出了贡献。我们使用轻推阈值而不是模型,因为我们证明了TimeInReview不能被精确地建模。在Meta上,NudgeBot已经被3万多名开发者使用。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
676
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信