Linux / Drivers / Slimbus
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 111 units with 2,216 lines of code in units (70.6% of code).
    • 2 very long units (230 lines of code)
    • 3 long units (202 lines of code)
    • 29 medium size units (975 lines of code)
    • 36 small units (519 lines of code)
    • 41 very small units (290 lines of code)
10% | 9% | 43% | 23% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c10% | 9% | 44% | 23% | 12%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT10% | 9% | 43% | 23% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
119 15 1
111 26 2
72 9 1
70 15 3
60 9 1
50 12 2
49 18 2
46 6 2
44 6 1
44 8 2
43 6 2
43 9 1
40 7 2
36 6 1
36 4 2
34 4 3
34 3 2
33 5 2
32 4 1
31 8 3
30 2 3
30 4 1
30 7 1
29 15 3
29 4 2
29 3 1
29 6 2
29 5 1
28 2 3
24 4 3
24 3 1
24 6 2
23 5 4
22 4 1
20 1 3
19 2 2
18 9 2
18 2 1
18 3 2
18 5 1
18 3 1
17 3 1
17 2 2
17 2 2
16 2 2
16 4 1
15 2 2
15 2 1
15 2 1
14 6 1