GerritCodeReview / plugins_healthcheck
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 71 units with 581 lines of code in units (51.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (88 lines of code)
    • 13 small units (178 lines of code)
    • 55 very small units (315 lines of code)
0% | 0% | 15% | 30% | 54%
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% | 15% | 30% | 54%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
healthcheck/check0% | 0% | 21% | 30% | 47%
healthcheck/filter0% | 0% | 0% | 73% | 26%
healthcheck0% | 0% | 0% | 17% | 82%
healthcheck/api0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public StatusSummary run()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/AbstractHealthCheck.java
40 6 0
static Collection getConfig()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/BlockedThreadsConfigurator.java
27 4 1
protected Result doCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/QueryChangesHealthCheck.java
21 3 0
protected Result doCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ProjectsListHealthCheck.java
19 4 0
private void doStatusCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/filter/HealthCheckStatusFilter.java
16 3 1
private static Optional getSpec()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/BlockedThreadsConfigurator.java
16 4 1
protected Result doCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/AuthHealthCheck.java
15 3 0
public void doFilter()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/filter/HealthCheckStatusFilter.java
14 4 3
public AuthHealthCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/AuthHealthCheck.java
14 1 6
protected AbstractHealthCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/AbstractHealthCheck.java
14 1 4
public ActiveWorkersCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ActiveWorkersCheck.java
13 1 6
public QueryChangesHealthCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/QueryChangesHealthCheck.java
12 1 5
protected Result doCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ActiveWorkersCheck.java
12 2 0
protected void configure()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckSubsystemsModule.java
11 1 0
private static Collection deduplicatePrefixes()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/BlockedThreadsConfigurator.java
11 2 1
public HealthCheckConfig()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/HealthCheckConfig.java
11 1 5
public ProjectsListHealthCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/ProjectsListHealthCheck.java
10 1 5
public BlockedThreadsCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/BlockedThreadsCheck.java
10 1 5
protected Result doCheck()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/BlockedThreadsCheck.java
10 1 0
public boolean equals()
in src/main/java/com/googlesource/gerrit/plugins/healthcheck/check/BlockedThreadsConfigurator.java
10 5 1