Linux / Arch / H8300
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 110 units with 1,140 lines of code in units (30.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (58 lines of code)
    • 8 medium size units (254 lines of code)
    • 28 small units (436 lines of code)
    • 73 very small units (392 lines of code)
0% | 5% | 22% | 38% | 34%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 6% | 22% | 43% | 27%
h0% | 0% | 20% | 20% | 58%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
kernel0% | 7% | 27% | 40% | 24%
include0% | 0% | 20% | 20% | 58%
lib0% | 0% | 0% | 63% | 36%
mm0% | 0% | 0% | 63% | 36%
boot0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
58 13 5
40 7 1
39 1 1
38 6 3
32 4 3
31 2 2
30 8 3
23 5 1
21 2 2
20 2 1
20 4 6
20 5 1
19 2 5
19 1 1
18 5 1
18 2 2
18 5 3
17 3 2
17 3 2
17 3 3
17 1 3
16 2 1
16 2 1
16 4 6
15 1 1
15 2 1
15 1 2
14 5 2
14 4 2
13 2 1
12 1 1
12 2 2
12 1 1
12 1 3
12 3 1
11 1 4
11 1 1
10 2 3
10 3 1
9 1 1
9 2 4
9 1 2
9 1 3
9 2 2
9 3 1
8 3 1
8 1 1
8 2 1
7 1 1
7 2 2