Linux / Drivers / Cdrom
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 3,029 lines of code in units (90.6% of code).
    • 1 very long units (108 lines of code)
    • 7 long units (458 lines of code)
    • 47 medium size units (1,384 lines of code)
    • 53 small units (776 lines of code)
    • 45 very small units (303 lines of code)
3% | 15% | 45% | 25% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c3% | 15% | 45% | 25% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT3% | 15% | 45% | 25% | 10%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
108 21 2
79 17 1
78 25 5
71 32 5
70 12 1
54 9 1
54 11 4
52 16 4
48 13 2
47 9 2
47 12 2
44 12 2
42 9 1
40 12 2
40 7 2
39 11 3
39 18 3
38 4 3
38 7 5
37 11 2
36 12 1
36 3 3
35 5 2
35 5 3
35 8 4
33 8 2
30 5 1
29 3 1
29 4 3
27 13 2
26 4 4
24 5 2
24 4 2
24 3 2
24 4 6
24 11 1
23 4 2
23 3 2
23 4 2
23 6 2
22 8 1
22 3 3
22 4 4
22 9 1
22 6 2
22 6 2
22 5 3
21 3 1
21 5 2
21 7 3