Linux / Drivers / Uio
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 103 units with 2,024 lines of code in units (70.8% of code).
    • 1 very long units (103 lines of code)
    • 7 long units (549 lines of code)
    • 19 medium size units (641 lines of code)
    • 32 small units (456 lines of code)
    • 44 very small units (275 lines of code)
5% | 27% | 31% | 22% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c5% | 27% | 31% | 22% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT5% | 27% | 31% | 22% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
103 25 1
99 24 1
98 15 1
94 18 1
89 17 1
59 14 3
57 11 2
53 9 2
48 9 2
48 13 2
47 10 2
46 7 2
45 9 4
43 8 2
41 9 7
39 8 2
32 7 4
30 4 1
29 7 4
29 4 1
25 3 1
24 4 2
24 4 2
24 5 2
24 5 2
22 5 4
21 5 1
20 5 1
20 5 1
19 3 3
18 4 2
18 3 1
17 4 2
16 3 4
16 2 3
16 2 3
16 5 2
15 4 2
15 5 2
15 3 3
15 2 2
15 3 2
15 3 1
14 3 2
14 3 4
13 2 2
13 2 2
12 2 1
12 2 2
12 3 1