Linux / Drivers / Parport
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 313 units with 6,104 lines of code in units (68.1% of code).
    • 4 very long units (489 lines of code)
    • 25 long units (1,719 lines of code)
    • 70 medium size units (2,171 lines of code)
    • 57 small units (820 lines of code)
    • 157 very small units (905 lines of code)
8% | 28% | 35% | 13% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c8% | 28% | 35% | 13% | 14%
h0% | 0% | 19% | 29% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT8% | 28% | 35% | 13% | 14%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
148 24 2
126 23 4
108 22 1
107 32 3
94 19 4
94 21 1
87 13 3
84 13 4
84 19 3
78 13 4
72 9 1
71 17 1
70 14 4
69 16 3
68 11 4
67 11 4
67 15 2
65 23 3
63 14 3
63 10 4
62 13 3
62 8 1
61 15 1
59 7 2
58 11 1
58 7 4
57 14 2
53 13 2
53 15 4
50 5 1
47 10 1
47 12 1
47 5 1
47 10 2
47 15 2
46 7 4
45 9 4
44 13 1
43 9 3
41 7 1
41 9 1
41 15 5
41 12 1
40 3 2
38 8 1
38 15 1
36 7 1
36 7 5
36 5 4
33 6 1