microsoft / azure-maven-archetypes
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 16 units with 274 lines of code in units (13.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (151 lines of code)
    • 6 small units (86 lines of code)
    • 5 very small units (37 lines of code)
0% | 0% | 55% | 31% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
scala0% | 0% | 66% | 26% | 6%
java0% | 0% | 57% | 29% | 13%
kt0% | 0% | 0% | 100% | 0%
groovy0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala0% | 0% | 66% | 26% | 6%
apache-spark-archetype/src/main/resources/archetype-resources/src/main/java0% | 0% | 100% | 0% | 0%
azure-iot-edge-archetype/src/main/resources/archetype-resources/src/main/java0% | 0% | 40% | 46% | 12%
azure-functions-kotlin-archetype/src/main/resources/archetype-resources/src/main/kotlin0% | 0% | 0% | 100% | 0%
apache-spark-archetype/src/main/resources/META-INF0% | 0% | 0% | 0% | 100%
azure-functions-archetype/src/main/resources/archetype-resources/src/main/java0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 16 longest units
Unit# linesMcCabe index# params
def main()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/SparkML_RankingMetricsExample.scala
50 5 1
def main()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/LogQuery.scala
31 7 1
public static void main()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/java/JavaSparkPi.java
26 4 1
def main()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/SparkSQL_RDDRelation.scala
22 1 1
public void execute()
in azure-iot-edge-archetype/src/main/resources/archetype-resources/src/main/java/App.java
22 5 4
fun run()
in azure-functions-kotlin-archetype/src/main/resources/archetype-resources/src/main/kotlin/Function.kt
20 1 4
private def runBasicDataFrameExample()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/SparkSQLExample.scala
17 1 1
public static void main()
in azure-iot-edge-archetype/src/main/resources/archetype-resources/src/main/java/App.java
14 2 1
def main()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/SparkStreaming_HdfsWordCount.scala
13 1 1
def main()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/SparkSQLExample.scala
11 1 1
public IotHubMessageResult execute()
in azure-iot-edge-archetype/src/main/resources/archetype-resources/src/main/java/App.java
11 2 2
void cleanupContent()
in apache-spark-archetype/src/main/resources/META-INF/archetype-post-generate.groovy
10 3 1
private def runDatasetCreationExample()
in apache-spark-archetype/src/main/resources/archetype-resources/src/main/scala/SparkSQLExample.scala
10 1 1
public void execute()
in azure-iot-edge-archetype/src/main/resources/archetype-resources/src/main/java/App.java
7 2 2
void cleanupFolder()
in apache-spark-archetype/src/main/resources/META-INF/archetype-post-generate.groovy
6 3 1
public HttpResponseMessage run()
in azure-functions-archetype/src/main/resources/archetype-resources/src/main/java/Function.java
4 1 0