GerritCodeReview / plugins_readonly
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 19 units with 118 lines of code in units (29.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 4 small units (51 lines of code)
    • 15 very small units (67 lines of code)
0% | 0% | 0% | 43% | 56%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java0% | 0% | 0% | 46% | 53%
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/readonly0% | 0% | 0% | 46% | 53%
tools0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 19 longest units
Unit# linesMcCabe index# params
private boolean shouldBlock()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnly.java
15 8 1
public void doFilter()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnly.java
13 5 3
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/readonly/Module.java
12 1 0
protected void configureCommands()
in src/main/java/com/googlesource/gerrit/plugins/readonly/SshModule.java
11 1 0
def revision()
in tools/workspace_status.py
9 3 0
public String intercept()
in src/main/java/com/googlesource/gerrit/plugins/readonly/DisableCommandInterceptor.java
9 4 1
public List onCommitReceived()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnly.java
7 2 1
public void setReadOnly()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyState.java
7 5 1
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
4 1 2
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
4 1 2
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/readonly/EnableReadOnlyCommand.java
3 1 0
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/readonly/GetReadOnlyStatusCommand.java
3 1 0
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/readonly/DisableReadOnlyCommand.java
3 1 0
public boolean isReadOnly()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyState.java
3 1 0
public Response apply()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyEndpoint.java
3 2 1
String message()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyConfig.java
3 1 0
List allowSshCommands()
in src/main/java/com/googlesource/gerrit/plugins/readonly/ReadOnlyConfig.java
3 1 0
protected void run()
in src/main/java/com/googlesource/gerrit/plugins/readonly/DisableCommand.java
3 1 0
protected void configureServlets()
in src/main/java/com/googlesource/gerrit/plugins/readonly/HttpModule.java
3 1 0