Linux / Drivers / Watchdog
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,883 units with 27,252 lines of code in units (69.4% of code).
    • 6 very long units (672 lines of code)
    • 75 long units (4,796 lines of code)
    • 248 medium size units (8,123 lines of code)
    • 439 small units (6,375 lines of code)
    • 1,115 very small units (7,286 lines of code)
2% | 17% | 29% | 23% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c2% | 17% | 29% | 23% | 26%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT2% | 17% | 29% | 23% | 26%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
121 25 1
119 21 2
114 21 1
113 19 2
103 26 1
102 24 1
95 17 1
93 25 3
91 23 1
85 16 1
85 16 2
84 13 1
83 28 2
81 19 1
81 16 2
79 18 1
79 21 3
77 15 1
77 29 1
76 17 4
75 13 2
73 14 1
72 15 2
71 25 1
71 14 1
71 14 2
69 8 1
68 10 1
68 14 1
68 12 1
68 16 2
67 12 1
66 8 1
66 18 3
65 12 1
65 20 3
64 13 1
64 10 1
63 10 1
63 11 1
63 8 1
62 16 1
62 17 1
61 11 1
61 14 3
61 16 3
61 10 1
60 10 2
60 11 1
59 13 1