Linux / Arch / Arm64
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 3,416 units with 44,237 lines of code in units (50.1% of code).
    • 10 very long units (1,762 lines of code)
    • 60 long units (3,738 lines of code)
    • 497 medium size units (14,624 lines of code)
    • 821 small units (12,056 lines of code)
    • 2,028 very small units (12,057 lines of code)
3% | 8% | 33% | 27% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c3% | 9% | 36% | 28% | 23%
pl66% | 19% | 6% | 3% | 2%
h0% | 1% | 12% | 22% | 64%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
crypto16% | 12% | 30% | 22% | 18%
kernel3% | 7% | 31% | 28% | 29%
net62% | 0% | 21% | 8% | 7%
kvm1% | 10% | 37% | 29% | 21%
lib0% | 16% | 65% | 9% | 9%
mm0% | 6% | 35% | 34% | 23%
include0% | 1% | 9% | 20% | 69%
hyperv0% | 0% | 34% | 50% | 15%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
446 175 3
216 1 0
192 48 5
172 5 0
158 1 1
139 47 5
121 40 1
110 33 2
104 2 0
104 29 3
100 17 1
90 17 4
90 27 3
88 40 2
83 17 3
82 8 6
78 8 0
76 24 1
75 13 1
74 17 1
73 24 1
73 6 2
69 22 1
69 16 1
68 1 0
68 13 4
68 15 4
65 11 4
65 19 3
64 22 2
64 11 6
63 15 2
62 13 6
61 11 1
61 19 1
61 12 3
61 15 3
60 20 2
59 12 1
58 16 1
57 10 1
57 10 1
57 11 6
57 2 3
56 13 1
56 11 2
56 12 3
55 6 1
55 14 4
55 8 3