Linux / Drivers / Ipack
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 73 units with 1,239 lines of code in units (68.6% of code).
    • 2 very long units (240 lines of code)
    • 3 long units (235 lines of code)
    • 7 medium size units (196 lines of code)
    • 19 small units (289 lines of code)
    • 42 very small units (279 lines of code)
19% | 18% | 15% | 23% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c19% | 18% | 15% | 23% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
devices45% | 0% | 6% | 28% | 18%
carriers0% | 39% | 25% | 16% | 18%
ROOT0% | 22% | 18% | 24% | 34%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
130 13 3
110 25 2
98 9 1
72 8 2
65 21 1
36 5 2
34 7 2
27 5 2
27 7 3
26 5 2
25 6 1
21 4 1
20 9 1
20 3 3
19 4 2
17 3 1
17 3 1
17 2 1
16 3 1
16 3 2
16 2 1
15 1 2
15 2 1
15 2 1
14 2 3
13 3 1
13 4 1
12 2 1
12 3 2
11 3 1
11 3 1
10 1 1
10 1 1
10 2 1
10 2 3
9 3 1
9 1 1
9 1 1
9 1 1
8 1 3
8 1 3
8 2 1
8 1 2
8 2 1
8 2 2
8 2 2
8 1 1
8 3 2
7 1 2
7 1 2