Linux / Drivers / Gpio
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,461 units with 39,847 lines of code in units (72.9% of code).
    • 10 very long units (1,241 lines of code)
    • 106 long units (7,083 lines of code)
    • 418 medium size units (12,899 lines of code)
    • 751 small units (10,966 lines of code)
    • 1,176 very small units (7,658 lines of code)
3% | 17% | 32% | 27% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c3% | 17% | 32% | 27% | 19%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT3% | 17% | 32% | 27% | 19%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
171 37 4
149 23 1
131 27 1
131 27 2
116 17 2
113 15 1
113 18 1
108 24 2
108 26 2
101 16 1
96 17 2
94 18 1
93 18 2
93 17 1
91 20 1
91 11 1
90 18 4
89 19 2
88 28 6
87 10 1
87 18 1
87 18 1
87 12 2
87 16 2
86 20 2
86 12 1
85 13 1
84 15 1
84 12 1
83 8 1
82 16 1
81 15 1
80 13 1
79 29 6
79 14 1
79 9 1
78 11 1
77 12 1
76 13 3
75 13 1
73 16 3
73 14 1
72 20 2
72 11 4
70 9 1
70 10 1
70 12 1
69 14 2
69 15 1
68 14 1