Linux / Init
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 150 units with 2,147 lines of code in units (69.4% of code).
    • 1 very long units (134 lines of code)
    • 2 long units (166 lines of code)
    • 31 medium size units (951 lines of code)
    • 29 small units (404 lines of code)
    • 87 very small units (492 lines of code)
6% | 7% | 44% | 18% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c6% | 7% | 44% | 18% | 22%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT6% | 7% | 44% | 18% | 22%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
134 11 1
91 20 1
75 15 1
48 11 1
46 9 2
44 9 1
42 8 1
41 5 1
41 13 1
39 12 1
38 7 1
36 11 1
35 8 1
34 10 4
32 9 1
30 14 1
30 6 4
30 4 1
30 5 3
29 10 1
29 8 1
26 9 2
26 2 1
24 5 1
23 6 1
23 6 1
23 6 1
23 4 1
22 2 1
22 6 2
22 8 1
21 4 1
21 1 1
21 9 1
19 4 1
18 7 1
18 7 4
18 3 1
18 1 1
18 3 1
17 6 1
17 4 4
15 7 4
14 3 1
13 3 2
13 3 1
13 3 3
13 2 1
13 4 1
13 2 3