Linux / Drivers / Rtc
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 2,086 units with 38,883 lines of code in units (72.5% of code).
    • 9 very long units (1,250 lines of code)
    • 75 long units (5,071 lines of code)
    • 590 medium size units (17,952 lines of code)
    • 634 small units (9,369 lines of code)
    • 778 very small units (5,241 lines of code)
3% | 13% | 46% | 24% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c3% | 13% | 46% | 24% | 13%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT3% | 13% | 46% | 24% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
222 54 2
187 57 3
133 27 2
128 29 2
126 28 1
119 26 1
119 26 1
112 19 1
104 17 5
100 16 1
96 22 2
95 18 1
95 15 1
95 16 1
94 29 2
92 28 2
89 25 1
88 12 2
87 8 1
84 18 1
84 24 2
82 11 1
80 18 1
79 13 1
79 13 1
77 16 2
75 15 1
74 12 1
74 15 2
74 17 2
74 11 4
73 16 1
73 14 1
73 14 2
72 10 1
72 11 1
71 10 1
70 12 1
70 13 1
69 14 2
69 14 1
67 12 1
66 13 1
65 12 1
65 11 1
64 12 1
63 8 2
62 13 1
62 11 1
62 9 1