Linux / Drivers / Mailbox
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 432 units with 7,827 lines of code in units (66.1% of code).
    • 6 very long units (728 lines of code)
    • 17 long units (1,171 lines of code)
    • 87 medium size units (2,830 lines of code)
    • 116 small units (1,738 lines of code)
    • 206 very small units (1,360 lines of code)
9% | 14% | 36% | 22% | 17%
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% | 36% | 22% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT9% | 14% | 36% | 22% | 17%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
146 27 1
133 23 1
124 19 2
118 22 1
105 10 1
102 19 1
99 17 1
91 15 1
79 16 1
72 6 2
71 12 1
71 14 1
71 11 3
69 13 1
69 11 1
68 11 2
66 13 1
63 10 1
63 10 1
56 12 1
56 8 4
54 11 1
53 4 8
50 6 1
50 11 2
50 8 2
49 8 2
48 3 4
47 5 2
47 13 1
46 5 1
44 5 2
43 17 8
42 7 1
42 8 1
42 8 1
42 6 1
42 8 2
42 8 3
42 10 1
42 9 4
41 9 1
40 5 2
40 7 2
40 7 2
39 6 2
39 6 2
38 6 2
38 6 1
38 11 2