PR size
Average number of lines of code changed (added plus removed) in a single pull request. This is an average for teams & individuals.
Computation of the metric
- PR data is collected from VCS platforms like GitHub, GitLab, etc.
- The lines of code changed (added + removed) are summed for each PR.
- The total lines changed across all PRs in the selected time range are calculated.
- The total number of pull requests within the chosen time frame is counted.
- The average lines of code changed per PR is computed by dividing the total lines changed by the total number of PRs.
Industry benchmarks
- The general industry standard for PR size is 300 lines of change.
Dashboard where this metric is used
- Dev Metric Grid
- Review Collaboration
Use cases of this metric
- Larger PRs almost always lead to slower cycle times & more rework compared to smaller PRs.
- Analyze trends in PR size to optimize code review processes. Larger PR sizes may indicate inefficiencies in bundling changes, while smaller sizes suggest more manageable reviews.
- Compare individual developers' PR sizes to assess productivity and code quality. Consistently large PR sizes may indicate complexity or lack of granularity, while smaller sizes may signify focused, incremental work.