Linux / Drivers / Ssb
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 350 units with 6,316 lines of code in units (85.6% of code).
    • 4 very long units (571 lines of code)
    • 15 long units (1,022 lines of code)
    • 72 medium size units (2,252 lines of code)
    • 105 small units (1,522 lines of code)
    • 154 very small units (949 lines of code)
9% | 16% | 35% | 24% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c9% | 16% | 36% | 24% | 13%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT9% | 16% | 35% | 24% | 15%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
194 2 2
155 33 2
113 19 2
109 5 2
86 32 3
82 19 1
80 17 1
80 13 3
76 13 2
74 10 2
71 11 2
68 19 3
65 13 1
61 5 2
61 15 2
57 14 2
56 11 2
54 18 1
51 8 5
50 4 2
49 10 2
49 8 5
47 9 3
45 3 1
45 9 2
44 8 1
44 10 7
43 10 2
43 9 4
41 6 5
41 7 5
41 7 5
41 11 2
41 10 7
40 6 5
40 5 2
38 7 1
38 1 2
37 10 4
37 11 1
36 6 1
35 1 2
35 6 1
35 5 3
33 7 1
33 5 2
33 11 1
33 6 2
32 10 1
32 5 4