行动更快,等待更少。改善Meta公司的代码审查时间

  • Code reviews are one of the most important parts of the software development process
  • 代码审查是软件开发过程中最重要的部分之一
  • At Meta we’ve recognized the need to make code reviews as fast as possible without sacrificing quality
  • 在Meta,我们已经认识到需要在不牺牲质量的前提下使代码审查尽可能快。
  • We’re sharing several tools and steps we’ve taken at Meta to reduce the time waiting for code reviews
  • 我们将分享我们在Meta采取的几个工具和步骤,以减少等待代码审查的时间。

When done well, code reviews can catch bugs, teach best practices, and ensure high code quality. At Meta we call an individual set of changes made to the codebase a “diff.” While we like to move fast at Meta, every diff must be reviewed, without exception. But, as the Code Review team, we also understand that when reviews take longer, people get less done.

如果做得好,代码审查可以捕捉错误传授最佳实践,并确保高的代码质量。在Meta,我们把对代码库所做的一系列单独的修改称为 "差异"。虽然我们喜欢在Meta公司快速行动,但每一个差异都必须被审查,没有例外。但是,作为代码审查团队,我们也明白,如果审查的时间长了,人们的工作就会减少。

We’ve studied several metrics to learn more about code review bottlenecks that lead to unhappy developers and used that knowledge to build features that help speed up the code review process without sacrificing review quality. We’ve found a correlation between slow diff review times (P75) and engineer dissatisfaction. Our tools to surface diffs to the right reviewers at key moments in the code review lifecycle have significantly improved the diff review experience.

我们研究了几个指标,以了解更多关于导致不快乐的开发人员的代码审查瓶颈,并利用这些知识来建立有助于加快代码审查过程的功能,而不牺牲审查质量。我们发现缓慢的差异审查时间(P75)和工程师的不满意之间有关联。我们的工具在代码审查生命周期的关键时刻将差异浮现给正确的审查人员,这大大改善了差异审查的体验。

What makes a diff review feel slow?

是什么让差异性审查感到缓慢?

To answer this question we started by looking at our data. We track a metric that we call “Time In Review,” which is a measure of how long a diff is waiting on review across all of its individual review cycles. We only account for the time when the diff is waiting on reviewer action.

为了回答这个问题,我们首先查看了我们的数据。我们跟踪一个我们称之为 "审查时间 "的指标,这是一个衡量一个差异在其所有单独的审查周期中等待审查的时间。我们只计算差异在等待审查员行动的时间。

Time In Review is calculated as the sum of the time spent in blue sections.

审查时间的计算方法是在蓝色部分花费的时间之和。

What we discover...

开通本站会员,查看完整译文。

Accueil - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-15 13:02
浙ICP备14020137号-1 $Carte des visiteurs$