Linux / Drivers / Thunderbolt
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 844 units with 14,084 lines of code in units (71.5% of code).
    • 1 very long units (104 lines of code)
    • 33 long units (2,093 lines of code)
    • 202 medium size units (6,066 lines of code)
    • 243 small units (3,592 lines of code)
    • 365 very small units (2,229 lines of code)
<1% | 14% | 43% | 25% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c<1% | 15% | 43% | 25% | 14%
h0% | 0% | 0% | 40% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT<1% | 14% | 43% | 25% | 15%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
104 32 1
83 16 1
80 17 1
76 12 1
74 15 2
72 11 1
71 12 1
70 18 1
70 1 1
69 23 1
68 9 4
68 2 1
68 2 1
66 11 7
63 11 3
62 16 3
62 14 5
62 12 1
61 14 1
60 2 1
60 2 1
60 1 1
59 7 3
58 14 2
58 16 1
58 18 3
57 14 4
56 19 1
56 15 4
54 1 1
54 10 1
54 7 1
53 30 3
51 20 2
50 12 2
50 1 1
49 13 3
48 11 2
48 10 2
46 12 1
46 14 8
46 6 8
46 10 2
45 5 8
45 7 1
44 11 1
44 2 1
44 2 1
44 1 1
44 9 3