Linux / Drivers / Vme
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 153 units with 4,846 lines of code in units (70.1% of code).
    • 8 very long units (1,240 lines of code)
    • 20 long units (1,330 lines of code)
    • 46 medium size units (1,357 lines of code)
    • 51 small units (738 lines of code)
    • 28 very small units (181 lines of code)
25% | 27% | 28% | 15% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c25% | 27% | 28% | 15% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
bridges30% | 33% | 23% | 9% | 2%
ROOT0% | 0% | 49% | 43% | 7%
boards0% | 0% | 86% | 0% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
238 22 2
200 20 2
193 31 7
144 11 1
121 24 7
118 14 4
113 21 7
113 23 4
87 24 7
81 23 5
81 23 5
81 20 7
78 17 4
78 17 4
78 18 7
69 12 4
69 15 7
66 17 7
66 12 4
62 8 2
60 9 2
56 4 1
56 1 1
54 4 1
53 11 4
52 12 7
52 3 1
51 11 4
46 6 2
44 13 7
44 9 4
44 9 4
41 5 3
40 4 2
37 15 3
36 4 3
35 1 5
34 3 1
34 9 2
33 7 4
33 9 2
32 10 4
32 4 3
31 2 5
31 4 2
31 22 1
31 5 4
29 8 4
29 9 4
28 7 7