Linux / Drivers / Memory
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 549 units with 12,441 lines of code in units (45.7% of code).
    • 11 very long units (2,324 lines of code)
    • 37 long units (2,510 lines of code)
    • 126 medium size units (3,926 lines of code)
    • 155 small units (2,217 lines of code)
    • 220 very small units (1,464 lines of code)
18% | 20% | 31% | 17% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c18% | 20% | 31% | 17% | 11%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tegra32% | 13% | 27% | 15% | 10%
ROOT6% | 26% | 34% | 19% | 13%
samsung13% | 18% | 37% | 23% | 6%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
844 193 2
225 91 2
191 49 2
174 33 2
169 47 2
142 27 2
136 25 1
124 20 3
109 17 1
108 21 5
102 7 3
98 19 1
94 6 3
90 26 3
85 16 1
82 21 1
79 14 4
79 13 3
78 11 1
76 15 1
75 18 4
75 11 1
75 11 2
74 17 1
73 10 2
73 5 4
71 20 1
71 18 3
69 15 4
64 19 2
64 5 2
63 14 3
63 14 2
62 6 1
62 3 2
59 27 2
58 11 1
58 14 2
58 13 3
57 11 1
57 14 3
56 3 2
54 9 2
52 11 1
52 8 2
52 12 1
51 8 1
51 10 1
50 4 3
50 7 4