Linux / Ipc
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 240 units with 4,780 lines of code in units (70.9% of code).
    • 5 very long units (640 lines of code)
    • 13 long units (903 lines of code)
    • 50 medium size units (1,670 lines of code)
    • 62 small units (872 lines of code)
    • 110 very small units (695 lines of code)
13% | 18% | 34% | 18% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c13% | 19% | 35% | 18% | 13%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT13% | 18% | 34% | 18% | 14%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
152 38 5
146 30 5
131 27 5
108 23 2
103 21 6
92 16 5
84 18 5
84 14 2
79 22 6
79 15 5
72 13 1
64 23 6
61 14 3
60 10 4
59 10 4
58 12 2
56 10 4
55 8 5
50 19 4
50 19 4
49 8 4
48 14 1
48 20 5
46 12 2
45 7 2
44 8 4
43 2 2
43 9 1
42 6 4
42 6 4
41 19 5
40 7 1
39 15 4
39 8 3
39 6 3
38 15 4
38 6 1
37 7 2
37 6 4
36 1 2
35 8 3
34 4 2
34 2 3
33 2 3
32 6 2
32 5 4
31 7 3
28 4 4
28 7 4
28 5 3