Linux / Drivers / Gnss
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 62 units with 999 lines of code in units (72.3% of code).
    • 1 very long units (113 lines of code)
    • 1 long units (59 lines of code)
    • 11 medium size units (332 lines of code)
    • 18 small units (258 lines of code)
    • 31 very small units (237 lines of code)
11% | 5% | 33% | 25% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c11% | 5% | 33% | 25% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT11% | 5% | 33% | 25% | 23%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
113 25 1
59 7 2
42 9 1
42 9 1
42 12 4
33 11 1
29 3 1
26 6 1
26 7 4
24 8 2
24 5 2
22 5 1
22 3 1
20 3 1
18 4 1
17 3 1
17 6 3
17 4 3
16 3 3
16 4 3
15 3 2
14 2 2
14 4 1
12 3 3
12 4 2
12 4 1
12 3 3
12 4 2
12 3 1
11 3 2
11 2 1
10 1 1
10 3 1
10 3 1
9 1 1
9 2 1
9 2 1
9 2 1
9 2 1
9 1 1
9 1 1
9 2 1
9 2 1
9 2 1
9 2 2
8 2 1
8 2 1
8 1 1
8 1 3
7 1 1