GerritCodeReview / plugins_admin-console
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 10 units with 275 lines of code in units (50.5% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (169 lines of code)
    • 2 medium size units (65 lines of code)
    • 0 small units (0 lines of code)
    • 6 very small units (41 lines of code)
0% | 61% | 23% | 0% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 63% | 24% | 0% | 12%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/java/com/googlesource/gerrit/plugins/adminconsole0% | 63% | 24% | 0% | 12%
tools0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
public void run()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowAccountCommand.java
95 21 0
public void run()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowRepoAccountAccessCommand.java
74 16 0
public void run()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowRepoAccessCommand.java
33 9 0
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ListUsersCommand.java
32 9 0
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/GetFullPathCommand.java
10 2 0
def revision()
in tools/workspace_status.py
9 3 0
protected void configureCommands()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/SshModule.java
7 1 0
private String format()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowRepoAccessCommand.java
6 2 1
private String format()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowRepoAccountAccessCommand.java
6 2 1
public int compare()
in src/main/java/com/googlesource/gerrit/plugins/adminconsole/ShowAccountCommand.java
3 1 2