Linux / Drivers / Memstick
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 239 units with 5,776 lines of code in units (83.1% of code).
    • 1 very long units (122 lines of code)
    • 30 long units (2,021 lines of code)
    • 70 medium size units (2,229 lines of code)
    • 62 small units (909 lines of code)
    • 76 very small units (495 lines of code)
2% | 34% | 38% | 15% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c2% | 34% | 38% | 15% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
core4% | 32% | 34% | 20% | 8%
host0% | 37% | 42% | 10% | 8%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
122 17 1
99 23 2
98 16 1
84 14 1
79 3 3
79 22 1
78 18 3
77 18 2
77 15 2
75 11 5
74 19 1
74 10 3
73 10 2
68 10 1
66 18 6
66 8 1
65 10 1
65 19 2
62 10 1
61 10 2
60 10 5
57 13 1
56 11 2
55 14 2
55 13 6
55 15 6
54 17 5
54 6 1
52 10 1
52 12 6
51 11 3
50 11 1
50 12 6
50 13 3
49 14 2
49 15 1
48 9 1
46 11 1
46 13 3
43 14 1
43 13 1
42 8 1
41 12 5
41 9 2
40 7 4
40 8 1
40 4 1
38 7 3
38 6 2
36 7 2