Linux / Drivers / Edac
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 1,249 units with 27,208 lines of code in units (69.3% of code).
    • 23 very long units (3,084 lines of code)
    • 118 long units (8,014 lines of code)
    • 267 medium size units (8,315 lines of code)
    • 277 small units (4,185 lines of code)
    • 564 very small units (3,610 lines of code)
11% | 29% | 30% | 15% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c11% | 29% | 30% | 15% | 13%
h0% | 0% | 0% | 32% | 67%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT11% | 29% | 30% | 15% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
250 47 8
231 65 2
170 18 2
168 36 2
154 32 3
144 19 1
141 15 2
130 30 4
129 30 2
126 33 2
126 23 1
121 18 1
116 17 1
115 17 2
114 15 2
112 14 2
110 17 2
108 9 2
107 11 1
107 17 2
103 16 1
101 27 2
101 20 1
99 12 2
97 23 1
96 11 1
96 12 2
95 24 11
95 15 2
93 25 2
93 35 1
92 9 2
91 13 1
90 11 1
89 15 2
86 8 1
85 10 2
85 15 4
85 10 2
84 6 1
84 24 4
83 19 2
82 21 1
81 36 1
81 11 1
80 16 3
80 11 1
78 10 1
78 9 2
78 10 1