github / azure-quickstart-templates
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 69 units with 2,966 lines of code in units (87.8% of code).
    • 2 very long units (1,889 lines of code)
    • 2 long units (120 lines of code)
    • 19 medium size units (576 lines of code)
    • 15 small units (228 lines of code)
    • 31 very small units (153 lines of code)
63% | 4% | 19% | 7% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py63% | 4% | 19% | 7% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
hortonworks-on-centos92% | 0% | 4% | <1% | 2%
cloudera-on-centos10% | 11% | 47% | 20% | 10%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
1777 8 1
112 23 0
67 10 0
53 14 1
49 20 0
48 26 2
43 1 1
39 5 4
36 16 2
36 13 0
34 15 0
32 7 0
30 14 0
26 8 2
26 6 0
25 11 0
23 6 0
23 3 0
22 8 0
21 6 2
21 9 0
21 5 0
21 3 0
19 5 1
19 3 0
18 8 0
18 7 0
17 2 0
17 8 2
16 7 0
15 6 2
15 4 3
14 4 0
13 3 0
13 8 2
12 3 0
11 4 0
11 3 1
10 6 0
10 3 1
9 2 0
9 3 2
8 4 2
8 5 2
7 1 0
7 2 1
7 3 4
7 1 1
6 2 1
6 1 1