Linux / Arch / Hexagon
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 238 units with 2,525 lines of code in units (35.9% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (482 lines of code)
    • 23 medium size units (643 lines of code)
    • 31 small units (445 lines of code)
    • 177 very small units (955 lines of code)
0% | 19% | 25% | 17% | 37%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 25% | 36% | 12% | 26%
h0% | 6% | 2% | 29% | 61%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
kernel0% | 20% | 46% | 9% | 22%
mm0% | 27% | 14% | 25% | 32%
lib0% | 57% | 0% | 0% | 42%
include0% | 6% | 2% | 29% | 61%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
88 22 3
84 14 2
74 16 4
73 14 5
61 1 1
51 8 1
51 1 1
45 3 1
45 16 1
43 5 6
36 8 1
31 4 3
30 4 5
28 8 1
28 2 1
27 1 3
27 7 2
26 4 3
25 3 1
25 4 1
25 1 2
24 4 2
24 1 2
23 6 4
23 5 1
22 1 3
22 5 1
22 6 3
21 5 2
21 4 3
20 2 2
18 2 3
18 5 1
17 2 2
16 1 1
16 1 1
16 1 1
16 1 2
16 1 2
16 1 2
16 1 3
16 2 2
16 2 2
16 2 2
15 3 3
15 3 1
15 2 2
14 4 2
13 1 1
13 1 1