GerritCodeReview / plugins_changemessage
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 6 units with 68 lines of code in units (49.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (35 lines of code)
    • 1 small units (12 lines of code)
    • 4 very small units (21 lines of code)
0% | 0% | 51% | 17% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 100% | 0% | 0%
java0% | 0% | 0% | 50% | 50%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/resources/static0% | 0% | 100% | 0% | 0%
src/main/java/com/googlesource/gerrit/plugins/changemessage0% | 0% | 0% | 80% | 20%
tools0% | 0% | 0% | 0% | 100%
src/main/java/com/googlesource/gerrit/plugins/changemessage/rest0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 6 longest units
Unit# linesMcCabe index# params
function onOpenChange()
in src/main/resources/static/info.js
35 2 2
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/changemessage/Module.java
12 1 0
def revision()
in tools/workspace_status.py
9 3 0
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/changemessage/rest/GetChangeInfo.java
5 1 1
public GetChangeInfo()
in src/main/java/com/googlesource/gerrit/plugins/changemessage/rest/GetChangeInfo.java
4 1 2
protected void configureServlets()
in src/main/java/com/googlesource/gerrit/plugins/changemessage/HttpModule.java
3 1 0