Linux / Drivers / Counter
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 174 units with 3,261 lines of code in units (73.0% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (466 lines of code)
    • 47 medium size units (1,511 lines of code)
    • 50 small units (756 lines of code)
    • 70 very small units (528 lines of code)
0% | 14% | 46% | 23% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 14% | 46% | 23% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 14% | 46% | 23% | 16%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
93 22 2
69 21 5
68 12 1
66 20 3
60 12 1
57 11 4
53 7 2
49 12 4
48 8 3
48 13 4
47 6 3
44 12 3
43 10 2
42 6 1
41 6 2
40 8 1
40 6 1
40 6 1
40 9 3
38 6 3
38 8 2
37 7 3
37 8 4
35 6 2
34 5 1
34 6 3
33 7 4
33 8 4
31 5 3
31 11 4
30 6 3
30 8 4
29 6 4
29 5 3
29 4 1
29 5 3
28 6 4
26 6 3
26 5 3
26 3 3
26 5 3
25 5 3
25 5 3
24 5 3
24 3 4
24 4 4
24 5 3
23 5 3
23 3 3
23 4 3