Linux / Drivers / Most
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 168 units with 2,502 lines of code in units (72.0% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (402 lines of code)
    • 28 medium size units (816 lines of code)
    • 44 small units (669 lines of code)
    • 90 very small units (615 lines of code)
0% | 16% | 32% | 26% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 16% | 32% | 26% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 16% | 32% | 26% | 24%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
88 12 5
85 14 1
67 13 3
58 9 5
52 13 3
52 10 3
46 12 3
45 11 1
42 6 3
40 11 4
36 8 1
34 5 4
32 6 1
32 13 1
32 7 1
30 6 2
30 5 2
28 7 4
28 3 2
28 8 2
27 5 1
27 10 3
27 5 1
25 4 2
25 5 1
25 5 1
24 6 1
24 7 1
22 4 4
22 11 1
22 6 1
21 4 1
21 3 1
21 3 2
20 4 3
20 6 3
20 5 3
19 3 3
19 2 1
19 5 3
19 6 3
18 4 3
18 3 1
18 5 3
18 6 3
18 6 1
17 4 1
17 4 3
17 8 3
16 3 3