Linux / Drivers / Devfreq
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 205 units with 4,246 lines of code in units (75.4% of code).
    • 2 very long units (273 lines of code)
    • 16 long units (1,070 lines of code)
    • 50 medium size units (1,539 lines of code)
    • 58 small units (864 lines of code)
    • 79 very small units (500 lines of code)
6% | 25% | 36% | 20% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c6% | 25% | 36% | 20% | 11%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT7% | 20% | 34% | 23% | 12%
event0% | 45% | 43% | 3% | 6%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
155 25 2
118 17 1
98 16 1
83 15 1
82 17 1
76 14 2
76 16 2
70 21 1
66 1 3
63 11 1
63 10 1
62 11 3
60 6 2
56 8 2
56 11 4
54 14 2
53 13 2
52 12 2
50 7 1
44 9 3
43 13 2
43 7 2
43 7 2
42 6 1
42 11 4
41 8 1
40 6 1
40 10 3
40 7 1
38 5 2
36 7 3
36 11 1
35 5 1
35 6 2
34 11 1
34 6 1
33 6 3
33 7 1
32 6 1
31 7 3
31 7 2
30 5 1
29 5 2
29 5 2
27 6 3
27 5 3
27 4 3
27 5 3
27 5 1
27 5 2