Linux / Drivers / Auxdisplay
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 191 units with 3,116 lines of code in units (70.7% of code).
    • 2 very long units (297 lines of code)
    • 7 long units (467 lines of code)
    • 29 medium size units (975 lines of code)
    • 43 small units (631 lines of code)
    • 110 very small units (746 lines of code)
9% | 14% | 31% | 20% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c9% | 14% | 31% | 20% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT9% | 14% | 31% | 20% | 23%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
157 40 1
140 44 1
96 18 1
83 21 1
67 9 3
63 21 2
55 9 2
52 13 1
51 13 1
48 7 1
46 10 3
45 12 1
44 8 2
43 13 1
43 9 5
42 13 1
40 9 1
39 5 1
37 10 1
37 7 3
36 8 2
32 4 1
31 6 1
31 8 1
31 3 5
30 7 2
30 6 3
30 8 1
29 4 1
29 6 1
28 8 3
27 7 1
27 5 3
26 6 1
25 4 1
24 3 1
24 6 1
21 4 2
20 6 4
20 3 3
20 4 1
20 5 1
20 4 3
19 3 1
18 3 1
18 1 1
18 4 1
18 1 1
17 1 1
16 5 1