Linux / Drivers / Mfd
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 2,196 units with 49,933 lines of code in units (53.8% of code).
    • 42 very long units (12,877 lines of code)
    • 131 long units (8,593 lines of code)
    • 430 medium size units (13,507 lines of code)
    • 566 small units (8,310 lines of code)
    • 1,027 very small units (6,646 lines of code)
25% | 17% | 27% | 16% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c25% | 17% | 27% | 16% | 13%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT25% | 17% | 27% | 16% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
1142 1135 2
1014 1006 2
1009 1001 2
832 827 2
726 718 2
701 694 2
683 676 2
677 670 2
612 604 2
470 462 2
391 83 1
250 54 1
246 239 2
240 48 2
218 42 1
209 43 2
202 47 1
190 32 1
178 171 2
175 168 2
162 40 2
156 24 2
141 22 3
135 23 1
135 128 2
134 125 2
134 20 2
133 31 6
128 19 2
123 18 2
122 19 1
121 14 2
115 108 2
114 16 1
113 16 4
111 22 2
109 102 2
107 37 3
105 25 1
105 26 2
105 98 2
104 16 1
99 18 2
98 19 1
98 23 2
97 17 2
95 21 1
94 15 1
93 15 2
92 17 1