Linux / Drivers / Mmc
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 3,129 units with 66,888 lines of code in units (76.9% of code).
    • 53 very long units (7,612 lines of code)
    • 202 long units (13,481 lines of code)
    • 798 medium size units (25,061 lines of code)
    • 874 small units (12,913 lines of code)
    • 1,202 very small units (7,821 lines of code)
11% | 20% | 37% | 19% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c11% | 20% | 37% | 19% | 11%
h0% | 0% | 7% | 6% | 86%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
host11% | 21% | 36% | 18% | 11%
core8% | 13% | 40% | 22% | 15%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
357 107 1
282 55 1
241 37 2
231 38 2
205 65 3
188 38 1
172 38 2
168 43 4
164 32 1
159 32 1
156 29 1
155 33 2
152 48 3
151 27 1
150 30 1
149 32 2
149 12 2
144 26 1
144 24 1
141 20 1
141 30 1
136 27 1
133 32 2
133 30 2
132 40 1
132 20 1
131 36 3
131 27 1
128 24 1
126 25 2
125 50 1
124 44 3
124 24 1
122 21 1
122 31 1
120 30 1
120 15 1
120 15 1
118 18 1
117 24 1
116 22 1
115 22 1
114 19 3
114 31 2
113 28 1
111 25 1
108 22 4
108 41 2
107 29 2
105 15 1