Linux / Drivers / Clocksource
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,181 units with 14,625 lines of code in units (74.0% of code).
    • 2 very long units (226 lines of code)
    • 35 long units (2,177 lines of code)
    • 120 medium size units (3,994 lines of code)
    • 238 small units (3,399 lines of code)
    • 786 very small units (4,829 lines of code)
1% | 14% | 27% | 23% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c1% | 14% | 27% | 23% | 32%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT1% | 14% | 27% | 23% | 33%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
125 12 3
101 21 1
98 15 3
78 9 2
75 12 1
73 7 1
71 8 1
70 8 1
70 14 1
69 15 1
69 7 1
68 13 2
66 12 3
65 7 1
63 10 1
62 8 1
61 11 1
61 13 2
60 6 4
60 13 1
60 12 2
59 6 1
59 10 1
58 13 2
58 11 1
58 9 1
57 14 2
57 7 1
55 7 2
54 6 1
53 8 2
53 6 1
52 6 4
52 8 1
51 7 1
51 6 1
51 6 1
49 8 1
49 11 3
49 10 1
48 5 3
47 7 1
47 7 2
47 5 1
47 8 2
46 10 6
46 3 3
46 9 1
46 7 1
46 6 1