Linux / Drivers / Opp
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 133 units with 2,362 lines of code in units (70.3% of code).
    • 1 very long units (109 lines of code)
    • 3 long units (199 lines of code)
    • 40 medium size units (1,273 lines of code)
    • 32 small units (462 lines of code)
    • 57 very small units (319 lines of code)
4% | 8% | 53% | 19% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c4% | 8% | 54% | 19% | 12%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT4% | 8% | 53% | 19% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
109 23 3
75 10 2
63 18 4
61 13 1
50 12 2
45 10 1
45 7 2
42 6 3
42 6 2
41 5 5
40 10 5
39 8 3
39 6 1
39 10 3
38 7 2
38 7 5
36 7 2
35 7 2
35 7 2
34 10 4
34 8 4
33 8 2
33 8 3
30 5 2
30 5 3
29 6 1
28 4 5
27 6 1
27 4 4
27 7 1
27 7 2
26 6 3
26 4 1
25 4 2
25 4 2
25 7 4
25 4 2
24 2 2
24 6 3
23 5 4
22 3 2
22 2 4
22 6 1
21 6 3
20 2 3
20 4 2
19 3 3
19 3 3
18 3 2
18 2 3