Linux / Drivers / Rapidio
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 279 units with 6,608 lines of code in units (64.1% of code).
    • 8 very long units (996 lines of code)
    • 18 long units (1,211 lines of code)
    • 92 medium size units (2,766 lines of code)
    • 66 small units (979 lines of code)
    • 95 very small units (656 lines of code)
15% | 18% | 41% | 14% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c15% | 18% | 41% | 14% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
devices20% | 25% | 37% | 8% | 8%
ROOT8% | 10% | 48% | 21% | 11%
switches0% | 0% | 16% | 58% | 24%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
149 29 2
139 15 4
138 27 5
134 15 4
119 15 2
109 21 2
104 23 5
104 8 2
94 14 1
92 13 1
85 16 2
81 10 4
76 20 2
75 6 1
70 28 3
65 12 8
61 10 3
61 8 1
60 11 6
60 4 1
60 10 2
57 10 4
54 10 2
54 6 2
53 6 2
53 6 1
48 9 1
48 5 2
48 6 1
48 9 2
47 10 3
47 7 1
47 7 2
45 8 2
44 3 2
43 12 2
43 5 1
42 8 1
42 11 3
41 11 2
39 9 2
38 6 3
38 8 1
38 11 3
37 5 2
37 10 2
36 4 2
35 5 5
35 9 2
35 3 1