Linux / Drivers / Pwm
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 557 units with 10,506 lines of code in units (69.8% of code).
    • 1 very long units (105 lines of code)
    • 31 long units (2,053 lines of code)
    • 143 medium size units (4,407 lines of code)
    • 156 small units (2,370 lines of code)
    • 226 very small units (1,571 lines of code)
<1% | 19% | 41% | 22% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c<1% | 19% | 41% | 22% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT<1% | 19% | 41% | 22% | 14%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
105 23 4
98 23 3
96 26 3
95 23 4
92 25 1
86 17 1
83 9 1
76 13 3
76 11 3
73 30 2
71 16 3
70 12 1
68 13 1
67 19 4
67 11 1
60 12 1
59 22 2
59 10 2
59 8 4
57 20 3
56 14 1
56 9 4
56 16 4
55 11 2
54 9 1
53 10 3
53 17 4
53 7 4
52 9 3
51 8 4
51 8 3
51 13 4
50 7 3
49 10 1
48 10 1
48 9 1
46 11 3
46 7 1
45 6 3
45 11 1
45 8 1
44 13 6
44 5 2
43 5 4
43 7 5
43 7 3
42 9 4
42 10 2
41 6 2
40 8 1