microsoft / generator-azuresfjava
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 42 units with 975 lines of code in units (81.8% of code).
    • 3 very long units (636 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (88 lines of code)
    • 8 small units (114 lines of code)
    • 27 very small units (137 lines of code)
65% | 0% | 9% | 11% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js71% | 0% | 9% | 11% | 6%
java0% | 0% | 0% | 13% | 86%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
generators/StatefulActor85% | 0% | 7% | 4% | 2%
generators/ReliableStatefulService81% | 0% | 9% | 5% | 3%
generators/ReliableStatelessService80% | 0% | 9% | 6% | 3%
generators/app0% | 0% | 41% | 32% | 26%
generators/AddService0% | 0% | 0% | 93% | 6%
generators/ReliableStatefulService/templates/class0% | 0% | 0% | 26% | 73%
generators/StatefulActor/templates/service0% | 0% | 0% | 0% | 100%
generators/ReliableStatelessService/templates/class0% | 0% | 0% | 0% | 100%
generators0% | 0% | 0% | 0% | 100%
generators/StatefulActor/templates/testclient0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
writing()
in generators/StatefulActor/index.js
263 20 0
writing()
in generators/ReliableStatefulService/index.js
192 15 0
writing()
in generators/ReliableStatelessService/index.js
181 13 0
async prompting()
in generators/ReliableStatefulService/index.js
22 3 0
async prompting()
in generators/ReliableStatelessService/index.js
22 3 0
async prompting()
in generators/StatefulActor/index.js
22 3 0
async prompting()
in generators/app/index.js
22 1 0
writing: function()
in generators/AddService/index.js
17 4 0
writing()
in generators/app/index.js
17 4 0
prompting: function()
in generators/AddService/index.js
15 1 0
constructor()
in generators/ReliableStatefulService/index.js
14 1 2
constructor()
in generators/ReliableStatelessService/index.js
14 1 2
constructor()
in generators/StatefulActor/index.js
14 1 2
protected CompletableFuture runAsync()
in generators/ReliableStatefulService/templates/class/Service.java
12 1 1
constructor: function()
in generators/AddService/index.js
11 2 0
public static void main()
in generators/ReliableStatefulService/templates/class/ServiceRunner.java
10 2 1
public static void main()
in generators/ReliableStatelessService/templates/class/ServiceRunner.java
10 2 1
private static CompletableFuture computeValueAsync()
in generators/ReliableStatefulService/templates/class/Service.java
9 2 3
public static void main()
in generators/StatefulActor/templates/service/class/Service.java
9 2 1
validateFQN: function()
in generators/utility.js
8 2 1