Pr Size

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

  1. PR data is collected from VCS platforms like GitHub, GitLab, etc.
  2. The lines of code changed (added + removed) are summed for each PR.
  3. The total lines changed across all PRs in the selected time range are calculated.
  4. The total number of pull requests within the chosen time frame is counted.
  5. The average lines of code changed per PR is computed by dividing the total lines changed by the total number of PRs.

Industry benchmarks

  1. The general industry standard for PR size is 300 lines of change.

Dashboard where this metric is used

  1. Dev Metric Grid
  2. Review Collaboration

Use cases of this metric

  1. Larger PRs almost always lead to slower cycle times & more rework compared to smaller PRs.
  2. 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.
  3. 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.