Linux / Drivers / Powercap
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 98 units with 1,702 lines of code in units (66.8% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (112 lines of code)
    • 26 medium size units (813 lines of code)
    • 33 small units (498 lines of code)
    • 37 very small units (279 lines of code)
0% | 6% | 47% | 29% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 6% | 47% | 29% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 6% | 47% | 29% | 16%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
57 9 1
55 10 1
50 12 1
42 13 3
42 7 1
40 7 3
40 19 3
40 8 1
39 9 1
37 6 3
37 7 3
34 6 3
34 9 4
33 9 1
31 6 3
28 7 4
27 4 3
27 6 1
27 7 1
26 4 1
25 6 2
25 6 1
24 7 3
21 1 3
21 2 2
21 2 2
21 8 4
21 3 2
20 4 2
20 8 3
20 5 1
19 2 5
19 7 3
19 3 1
18 3 2
18 3 1
17 1 4
17 3 2
17 5 1
16 2 3
16 1 1
15 2 2
15 4 1
15 4 1
15 3 1
15 1 1
14 5 1
14 4 1
14 2 1
13 3 3