Linux / Crypto
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 1,886 units with 33,078 lines of code in units (39.9% of code).
    • 21 very long units (4,099 lines of code)
    • 88 long units (5,822 lines of code)
    • 349 medium size units (10,703 lines of code)
    • 451 small units (6,621 lines of code)
    • 977 very small units (5,833 lines of code)
12% | 17% | 32% | 20% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c12% | 17% | 32% | 20% | 17%
h0% | 0% | 0% | 20% | 79%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT13% | 14% | 32% | 20% | 18%
asymmetric_keys0% | 43% | 28% | 16% | 10%
async_tx0% | 28% | 30% | 14% | 26%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
1253 291 5
181 3 1
180 1 2
172 39 9
165 4 3
162 64 6
149 25 8
149 19 2
149 28 2
146 45 6
145 25 6
144 16 5
144 3 4
133 27 7
132 33 6
128 28 4
119 24 4
115 21 3
114 30 2
112 15 3
107 17 7
97 16 6
94 1 2
90 22 2
90 12 5
90 1 1
88 16 1
87 20 3
83 19 3
82 9 1
82 15 2
80 28 4
80 11 2
79 15 2
79 5 4
79 26 3
78 14 3
77 15 3
76 24 1
76 1 2
75 1 3
75 17 5
74 16 4
73 8 4
73 13 1
73 16 4
72 11 3
72 15 2
70 14 4
70 12 6