Linux / Drivers / Ata
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 2,100 units with 42,755 lines of code in units (74.4% of code).
    • 23 very long units (3,298 lines of code)
    • 135 long units (8,911 lines of code)
    • 519 medium size units (16,116 lines of code)
    • 648 small units (9,382 lines of code)
    • 775 very small units (5,048 lines of code)
7% | 20% | 37% | 21% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c7% | 20% | 37% | 21% | 11%
h0% | 0% | 24% | 33% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT7% | 20% | 37% | 21% | 11%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
280 75 6
206 34 2
195 55 1
167 64 1
161 29 2
160 14 1
157 39 6
154 62 1
151 52 2
149 9 1
146 24 1
126 24 4
122 27 1
119 17 2
119 33 4
118 21 1
117 15 3
115 23 2
114 28 1
110 22 7
108 21 1
103 20 1
101 11 2
100 16 1
99 16 2
99 21 1
99 18 2
99 23 1
98 9 1
97 21 2
97 36 2
96 33 2
95 18 1
94 23 2
94 16 1
89 11 1
88 17 2
87 4 1
87 17 1
86 21 2
84 31 1
84 18 2
83 17 1
83 19 1
82 13 2
82 20 2
82 34 3
80 18 2
79 11 1
78 14 2