Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Definition (Hover Text)

PR size value measures Pull Request (PR) Size measures the number of source lines of code (also known as SLOC) affected by a pull request.

Source Tools

Github, Gitlab, Bitbucket, Azure Repo

Graph type

LineY Axis - LOC

X - Axis - Days/Weeks/Months
Y Axis - Count (Lines of Code)

FiltersBranch

Branches & Developers

Hover Format on KPI<ABC> LOC

<From Date - To Date>: Lines
No. of PRs: XX

Fields on OverlayExplore

  • Project

  • Repository

URL
  • Branch

  • Days/

Week
  • Weeks

  • Developer

  • No. of Merge Requests

  • PR Size (

LOC
  • Lines of Code)

Business Logic

Calculation Formula

Physical SLOC ()LOCOption 1 - count of lines in the text of Source Lines of Code):

  • Option 1: Counts all lines in the program's source code

(all the lines, inclusive lines with comments or empty) - preferably as a first phaseOption 2 - count of lines in the text of the program's source code excluding comment lines and lines that are blank or contain only white spaceLogical SLOC () - attempts to measure the number of executable "statements"LLOCSource: , https://en.wikipedia.org/wiki/Source_lines_of_codehttps://smartbear.com/blog/should-code-review-metrics-be-locs-or-slocs/
  • , including comments and empty lines. This approach is preferable in the first phase.

  • Option 2: Counts only the lines in the source code, excluding comment lines, blank lines, or lines containing only white space.

Logical SLOC (LLOC): Measures the number of executable statements in the source code.

Source:

  • Wikipedia - Source Lines of Code

  • SmartBear Blog - Should Code Review Metrics be LOCs or SLOCs

Trend

A decreasing trend is a +ve signconsidered positive

Maturity Levels

M1: 0-2
M2: 2-4
M3: 4-8
M4: 8-16
M5: >16

Instance level thresholds

250 LOC4

Configurations

Processor Fields

Nil

KPI Specific fields

NoneTarget KPI Value

How to Validate KPI

Suggested ways of working

  • Ensure each pull request follows standard formatting to allow proper analysis of size.

Sample JQLs

N/A

Benefits of KPI

How does the KPI help

The PR Size KPI helps by indicating the complexity and scope of changes in a pull request. It aids in managing review workload, as smaller PRs are easier to review, and larger ones may require more attention, reducing review delays and improving code quality.