aws-samples / amazon-eks-apache-spark-etl-sample
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 5 units with 111 lines of code in units (21.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 1 medium size units (25 lines of code)
    • 2 small units (30 lines of code)
    • 1 very small units (5 lines of code)
0% | 45% | 22% | 27% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
scala0% | 45% | 22% | 27% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
spark-application/src/main/scala0% | 45% | 22% | 27% | 4%
Alternative Visuals
Longest Units
Top 5 longest units
Unit# linesMcCabe index# params
def runJob()
in spark-application/src/main/scala/ValueZones.scala
51 1 5
def main()
in spark-application/src/main/scala/ValueZones.scala
25 4 1
def readGreen()
in spark-application/src/main/scala/ValueZones.scala
15 1 1
def readYellow()
in spark-application/src/main/scala/ValueZones.scala
15 1 1
def buildSourcePath()
in spark-application/src/main/scala/ValueZones.scala
5 1 3