Linux / Drivers / Interconnect
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 89 units with 1,777 lines of code in units (10.4% of code).
    • 1 very long units (110 lines of code)
    • 6 long units (410 lines of code)
    • 23 medium size units (698 lines of code)
    • 24 small units (355 lines of code)
    • 35 very small units (204 lines of code)
6% | 23% | 39% | 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
c6% | 23% | 39% | 19% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
qcom10% | 34% | 31% | 14% | 8%
samsung0% | 65% | 0% | 34% | 0%
ROOT0% | 0% | 56% | 29% | 14%
imx0% | 0% | 56% | 18% | 25%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
110 21 1
92 16 1
74 12 1
66 11 1
65 11 1
58 9 1
55 9 1
45 8 2
42 4 2
40 5 2
40 7 2
36 5 3
36 7 3
33 6 2
32 5 3
32 6 2
31 6 4
30 6 1
29 5 2
28 7 2
27 5 3
27 3 2
26 5 2
26 3 2
26 4 1
25 5 2
23 4 1
22 6 6
21 6 1
21 6 1
20 3 1
20 3 2
20 4 3
19 3 1
18 2 2
18 2 3
18 3 1
17 6 6
15 3 1
15 2 2
15 3 2
14 3 1
14 3 2
14 5 2
13 4 1
13 3 2
12 2 2
12 3 5
12 2 1
12 1 1