Linux / Drivers / Bluetooth
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 782 units with 18,251 lines of code in units (76.0% of code).
    • 8 very long units (1,216 lines of code)
    • 74 long units (5,019 lines of code)
    • 212 medium size units (6,926 lines of code)
    • 226 small units (3,407 lines of code)
    • 262 very small units (1,683 lines of code)
6% | 27% | 37% | 18% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c6% | 27% | 38% | 18% | 8%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT6% | 27% | 37% | 18% | 9%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
270 77 2
198 42 1
139 23 1
132 20 1
127 17 1
119 20 3
116 33 1
115 18 1
99 14 1
99 24 1
98 13 3
95 18 1
93 14 1
92 17 2
91 22 5
90 15 3
88 18 2
85 17 2
85 13 1
85 21 2
84 14 1
84 17 1
84 8 4
84 21 1
83 14 1
79 25 2
79 17 4
78 15 1
77 21 3
76 14 1
74 10 1
73 15 4
71 12 2
71 17 1
69 9 3
68 12 3
68 15 4
67 10 2
66 7 1
64 21 1
63 15 1
63 12 2
63 11 2
63 14 1
63 11 3
63 12 4
62 9 2
62 12 2
62 14 1
62 10 2