Linux / Arch / S390
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,070 units with 46,399 lines of code in units (60.9% of code).
    • 15 very long units (2,507 lines of code)
    • 86 long units (5,559 lines of code)
    • 550 medium size units (17,019 lines of code)
    • 767 small units (11,316 lines of code)
    • 1,652 very small units (9,998 lines of code)
5% | 11% | 36% | 24% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c6% | 13% | 39% | 24% | 16%
h0% | 2% | 10% | 20% | 66%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
kvm10% | 18% | 41% | 18% | 11%
net67% | 0% | 14% | 8% | 9%
kernel2% | 12% | 37% | 25% | 21%
mm3% | 13% | 40% | 29% | 12%
crypto0% | 17% | 29% | 28% | 24%
lib0% | 15% | 46% | 25% | 12%
pci0% | 4% | 40% | 36% | 18%
include0% | 2% | 11% | 21% | 64%
appldata0% | 14% | 59% | 17% | 7%
boot0% | 0% | 61% | 23% | 14%
hypfs0% | 0% | 47% | 23% | 29%
tools0% | 0% | 47% | 43% | 8%
purgatory0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
692 218 5
194 88 6
169 56 5
158 65 6
156 34 3
137 1 1
126 32 2
119 26 3
114 31 3
111 31 2
109 39 1
109 26 2
109 32 2
103 20 2
101 30 2
100 19 2
96 4 1
92 23 2
90 28 1
88 22 2
83 22 5
83 23 1
82 19 4
80 46 2
79 11 2
78 20 5
75 17 2
74 27 1
74 20 3
73 3 2
73 21 4
72 19 1
72 19 1
72 15 2
72 26 1
71 15 3
71 23 1
70 23 4
70 25 2
70 30 5
69 17 1
69 8 1
68 13 2
68 33 1
68 5 1
67 5 4
67 25 1
66 11 1
65 2 2
65 2 2