Linux / Drivers / Bcma
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 243 units with 4,050 lines of code in units (86.3% of code).
    • 3 very long units (514 lines of code)
    • 10 long units (636 lines of code)
    • 41 medium size units (1,212 lines of code)
    • 61 small units (886 lines of code)
    • 128 very small units (802 lines of code)
12% | 15% | 29% | 21% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c12% | 15% | 30% | 22% | 18%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT12% | 15% | 29% | 21% | 19%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
229 3 2
154 25 2
131 49 5
100 10 1
69 15 1
68 18 6
64 13 1
58 10 2
56 10 1
56 12 1
56 22 1
55 14 6
54 11 2
50 14 1
48 11 6
44 10 1
39 7 5
38 7 5
38 7 2
38 1 2
38 5 1
37 23 1
37 6 1
36 4 3
35 12 1
34 10 1
33 7 1
33 9 1
33 4 4
30 6 1
29 1 3
28 9 1
27 8 2
27 7 1
26 7 2
25 4 1
25 6 1
25 5 1
24 6 3
24 7 1
23 4 1
23 8 4
23 3 1
23 5 5
23 4 1
23 9 2
22 5 4
22 4 1
22 5 5
22 4 3