Linux / Drivers / Spmi
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 87 units with 1,471 lines of code in units (65.8% of code).
    • 1 very long units (141 lines of code)
    • 4 long units (239 lines of code)
    • 15 medium size units (495 lines of code)
    • 20 small units (303 lines of code)
    • 47 very small units (293 lines of code)
9% | 16% | 33% | 20% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c9% | 16% | 33% | 20% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT9% | 16% | 33% | 20% | 19%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
141 21 1
66 9 6
63 8 6
59 9 1
51 6 1
45 11 6
44 12 1
41 7 5
41 7 2
41 7 1
35 9 6
34 9 4
32 7 2
29 9 7
29 5 6
27 5 2
26 9 7
26 4 1
24 4 5
21 4 4
19 3 7
19 3 2
18 2 1
17 2 6
17 3 4
16 2 6
16 3 3
16 2 1
16 2 3
16 2 5
16 3 3
15 2 7
15 2 5
15 2 1
14 4 1
13 2 4
12 2 3
11 2 4
11 4 6
11 4 6
10 2 4
10 1 1
10 3 2
10 1 1
10 1 1
9 3 2
9 2 1
9 1 1
8 2 3
8 3 4