microsoft / fabric8-maven-plugin
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 1,457 units with 13,448 lines of code in units (73.6% of code).
    • 4 very long units (465 lines of code)
    • 16 long units (1,038 lines of code)
    • 121 medium size units (3,546 lines of code)
    • 243 small units (3,551 lines of code)
    • 1,073 very small units (4,848 lines of code)
3% | 7% | 26% | 26% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
java3% | 7% | 26% | 26% | 36%
groovy0% | 0% | 43% | 13% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
plugin/src3% | 11% | 29% | 25% | 29%
enricher/standard7% | 9% | 30% | 25% | 26%
core/src2% | 5% | 22% | 28% | 41%
enricher/fabric89% | 9% | 29% | 30% | 20%
watcher/standard0% | 22% | 39% | 25% | 13%
enricher/api0% | 0% | 25% | 22% | 52%
generator/java-exec0% | 0% | 43% | 24% | 31%
generator/api0% | 0% | 17% | 15% | 67%
generator/spring-boot0% | 0% | 20% | 33% | 45%
ROOT0% | 0% | 43% | 13% | 43%
generator/webapp0% | 0% | 12% | 12% | 75%
doc/src0% | 0% | 52% | 30% | 16%
generator/karaf0% | 0% | 0% | 40% | 59%
generator/vertx0% | 0% | 0% | 25% | 75%
watcher/api0% | 0% | 0% | 0% | 100%
generator/wildfly-swarm0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public void executeInternal()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/AppCatalogMojo.java
157 30 0
public void adapt()
in enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/VolumePermissionEnricher.java
105 21 1
public Closeable forwardPortAsync()
in core/src/main/java/io/fabric8/maven/core/service/PortForwardService.java
102 14 4
protected String embeddedIconsInConsole()
in enricher/fabric8/src/main/java/io/fabric8/maven/enricher/fabric8/IconEnricher.java
101 49 2
protected void generateHTML()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/internal/ManifestIndexMojo.java
83 13 6
private boolean createOrUpdateFabric8MavenPlugin()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/infra/SetupMojo.java
81 19 1
public HasMetadata convert()
in plugin/src/main/java/io/fabric8/maven/plugin/converter/DeploymentOpenShiftConverter.java
78 20 1
public void addMissingResources()
in enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/DefaultControllerEnricher.java
73 16 1
protected void generateHTML()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/internal/HelmIndexMojo.java
71 10 2
public void executeInternal()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/internal/ImportMojo.java
70 12 0
private void runRemoteSpringApplication()
in watcher/standard/src/main/java/io/fabric8/maven/watcher/standard/SpringBootWatcher.java
70 10 1
private void waitAndLogPods()
in core/src/main/java/io/fabric8/maven/core/service/PodLogService.java
66 19 8
protected static HasMetadata mergeDeployments()
in core/src/main/java/io/fabric8/maven/core/util/KubernetesResourceUtil.java
63 13 4
public void executeInternal()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/build/ApplyMojo.java
62 11 0
protected void applyEntities()
in plugin/src/main/java/io/fabric8/maven/plugin/mojo/develop/DebugMojo.java
58 17 5
public static List translateCommandline()
in core/src/main/java/io/fabric8/maven/core/util/Commandline.java
56 17 1
private String convertIconFileToURL()
in enricher/fabric8/src/main/java/io/fabric8/maven/enricher/fabric8/IconEnricher.java
54 12 2
public static void mergePodSpec()
in core/src/main/java/io/fabric8/maven/core/util/KubernetesResourceUtil.java
51 15 3
public void addMissingResources()
in enricher/fabric8/src/main/java/io/fabric8/maven/enricher/fabric8/AutoTLSEnricher.java
51 10 1
public void addMissingResources()
in enricher/standard/src/main/java/io/fabric8/maven/enricher/standard/NameEnricher.java
51 8 1