GerritCodeReview / plugins_gerrit-support
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 161 units with 827 lines of code in units (58.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (133 lines of code)
    • 12 small units (157 lines of code)
    • 144 very small units (537 lines of code)
0% | 0% | 16% | 18% | 64%
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% | 19% | 13% | 66%
scala0% | 0% | 0% | 39% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/main/java/org/jutils/jhardware/info/network0% | 0% | 92% | 0% | 7%
src/main/java/org/jutils/jhardware/info/os0% | 0% | 41% | 15% | 43%
src/main/java/org/jutils/jhardware/util0% | 0% | 24% | 36% | 39%
src/main/scala/com/googlesource/gerrit/plugins/support0% | 0% | 0% | 39% | 60%
src/main/java/org/jutils/jhardware/info/processor0% | 0% | 0% | 43% | 56%
src/main/java/org/jutils/jhardware0% | 0% | 0% | 55% | 44%
src/main/java/org/jutils/jhardware/info0% | 0% | 0% | 63% | 36%
src/main/java/org/jutils/jhardware/model0% | 0% | 0% | 0% | 100%
src/main/java/org/jutils/jhardware/info/memory0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static void updateNetworkData()
in src/main/java/org/jutils/jhardware/info/network/unix/UnixNetworkInfo.java
37 7 3
protected Map parseInfo()
in src/main/java/org/jutils/jhardware/info/os/unix/UnixOSInfo.java
30 7 0
private static String readData()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
24 6 1
protected NetworkInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/network/AbstractNetworkInfo.java
21 3 1
protected Map parseInfo()
in src/main/java/org/jutils/jhardware/info/network/unix/UnixNetworkInfo.java
21 4 0
def from()
in src/main/scala/com/googlesource/gerrit/plugins/support/commands/FileAttribute.scala
16 1 1
protected ProcessorInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/processor/AbstractProcessorInfo.java
16 3 1
public static void main()
in src/main/java/org/jutils/jhardware/HardwareInfo.java
16 2 1
private static HardwareInfo getUnixInfo()
in src/main/java/org/jutils/jhardware/info/HardwareFactory.java
14 5 1
def processRequest()
in src/main/scala/com/googlesource/gerrit/plugins/support/RequestProcessor.scala
13 1 1
private def newBundleName = BundleName()
in src/main/scala/com/googlesource/gerrit/plugins/support/SupportBundle.scala
13 1 2
public static List readFile()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
13 3 1
public static String extractText()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
12 3 2
private def listDir()
in src/main/scala/com/googlesource/gerrit/plugins/support/commands/PluginsInfoCommand.scala
11 1 1
def getResults: Seq[CommandResult] = Seq()
in src/main/scala/com/googlesource/gerrit/plugins/support/GerritSupportCommands.scala
11 1 1
protected OSInfo buildFromDataMap()
in src/main/java/org/jutils/jhardware/info/os/AbstractOSInfo.java
11 3 1
public static String executeCommand()
in src/main/java/org/jutils/jhardware/util/HardwareInfoUtils.java
11 2 1
def getAsPath()
in src/main/scala/com/googlesource/gerrit/plugins/support/SitePathsWrapper.scala
10 2 1
def apply()
in src/main/scala/com/googlesource/gerrit/plugins/support/SupportBundle.scala
10 6 1
def canPerform()
in src/main/scala/com/googlesource/gerrit/plugins/support/latest/LatestCapabilityControl.scala
10 2 1