Linux / Drivers / Nvdimm
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 519 units with 8,961 lines of code in units (74.3% of code).
    • 6 very long units (799 lines of code)
    • 17 long units (1,133 lines of code)
    • 98 medium size units (3,188 lines of code)
    • 159 small units (2,319 lines of code)
    • 239 very small units (1,522 lines of code)
8% | 12% | 35% | 25% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c9% | 13% | 37% | 26% | 14%
h0% | 0% | 0% | 15% | 84%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT8% | 12% | 35% | 25% | 16%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
177 29 4
157 41 5
128 20 2
117 33 4
117 32 2
103 18 1
90 21 6
83 18 4
80 12 5
79 11 1
71 12 1
69 15 6
67 16 1
66 19 2
66 15 2
61 6 1
60 21 1
59 13 1
58 18 2
58 7 4
58 13 1
56 21 3
52 15 1
49 8 1
49 8 1
48 13 3
48 10 4
46 10 3
45 12 1
45 9 6
44 14 6
43 5 1
42 22 3
42 5 2
41 10 4
41 9 2
41 2 1
41 10 4
41 12 1
40 4 1
39 4 1
39 9 1
38 10 3
38 8 8
38 10 4
38 6 1
37 6 2
37 10 3
37 8 4
36 8 3