Linux / Drivers / Cpufreq
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 1,081 units with 19,949 lines of code in units (73.8% of code).
    • 13 very long units (1,682 lines of code)
    • 52 long units (3,467 lines of code)
    • 246 medium size units (7,557 lines of code)
    • 285 small units (4,156 lines of code)
    • 485 very small units (3,087 lines of code)
8% | 17% | 37% | 20% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c8% | 17% | 37% | 20% | 15%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT8% | 17% | 37% | 20% | 15%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
173 38 1
155 29 2
154 38 1
145 25 1
145 38 1
134 26 1
125 14 1
124 24 1
116 32 1
104 21 1
103 18 1
102 14 1
102 28 2
97 19 1
96 20 2
96 21 2
95 14 1
90 15 1
87 19 1
87 16 2
85 21 3
84 24 1
77 15 1
76 16 2
75 13 1
74 12 2
73 9 1
72 11 1
72 18 2
70 17 1
69 11 1
69 10 1
68 22 1
67 11 1
66 10 3
65 10 1
65 12 1
65 22 1
64 12 2
62 9 3
62 10 1
62 10 1
59 8 1
59 11 1
59 15 5
58 10 1
58 15 5
58 10 2
58 6 1
57 7 1