Linux / Drivers / Fsi
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 243 units with 4,490 lines of code in units (82.4% of code).
    • 1 very long units (164 lines of code)
    • 13 long units (882 lines of code)
    • 61 medium size units (1,877 lines of code)
    • 58 small units (854 lines of code)
    • 110 very small units (713 lines of code)
3% | 19% | 41% | 19% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c3% | 19% | 41% | 19% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT3% | 19% | 41% | 19% | 15%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
164 24 1
99 16 3
88 22 4
78 16 5
76 13 4
76 9 1
70 9 1
61 9 1
60 9 5
56 8 1
56 11 4
54 12 1
54 8 1
54 8 1
50 11 2
49 7 4
47 5 1
47 10 1
47 10 1
45 10 4
45 12 4
43 11 4
43 7 1
42 8 6
40 8 6
40 8 3
40 7 4
40 7 4
38 5 1
37 5 1
37 11 4
35 9 5
34 7 4
34 1 1
31 13 1
31 5 1
30 8 5
30 8 4
30 8 4
29 5 6
29 5 6
29 8 1
28 5 4
28 7 2
28 9 2
28 4 1
27 5 4
27 6 3
27 3 2
27 9 4