Linux / Drivers / Nvmem
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 190 units with 3,529 lines of code in units (61.2% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (440 lines of code)
    • 56 medium size units (1,846 lines of code)
    • 50 small units (766 lines of code)
    • 77 very small units (477 lines of code)
0% | 12% | 52% | 21% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 12% | 52% | 21% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 12% | 52% | 21% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
89 15 4
75 17 1
64 9 1
56 9 1
53 8 1
52 9 1
51 11 4
49 8 1
48 8 1
48 6 2
48 7 1
47 7 4
47 8 1
46 5 4
46 6 1
45 7 4
44 4 4
41 5 1
41 10 5
41 6 4
40 6 4
40 4 4
39 8 1
38 6 4
38 6 1
37 9 1
36 6 4
34 9 1
33 3 4
33 6 1
33 5 1
33 7 4
32 4 5
32 4 1
32 4 1
32 5 5
32 6 4
31 8 4
31 2 3
31 6 4
30 6 3
29 5 1
28 4 1
28 8 6
28 8 6
27 5 2
26 4 1
26 4 1
26 4 4
25 5 4