Linux / Drivers / Reset
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 235 units with 3,262 lines of code in units (55.0% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (179 lines of code)
    • 40 medium size units (1,135 lines of code)
    • 76 small units (1,169 lines of code)
    • 116 very small units (779 lines of code)
0% | 5% | 34% | 35% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 5% | 34% | 35% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 6% | 34% | 36% | 22%
sti0% | 0% | 56% | 24% | 19%
hisilicon0% | 0% | 32% | 25% | 42%
tegra0% | 0% | 0% | 41% | 58%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
62 11 1
61 6 2
56 15 1
47 8 1
44 7 1
43 8 1
42 6 1
42 7 1
39 9 2
36 9 1
35 26 1
33 5 1
33 5 1
32 5 1
30 5 1
30 5 1
29 5 1
29 9 3
28 11 1
26 4 1
26 3 2
26 8 1
26 4 1
25 3 3
25 10 1
25 11 1
25 14 3
25 4 3
24 4 2
24 4 1
24 9 1
23 4 1
23 4 1
23 4 1
22 3 1
22 4 1
22 4 1
22 3 1
21 4 1
21 5 3
21 5 2
21 4 6
21 4 1
20 3 1
20 3 1
20 3 6
20 2 3
20 3 1
20 2 3
19 2 3