Linux / Arch / Microblaze
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 247 units with 3,443 lines of code in units (32.4% of code).
    • 2 very long units (211 lines of code)
    • 9 long units (649 lines of code)
    • 30 medium size units (992 lines of code)
    • 42 small units (661 lines of code)
    • 164 very small units (930 lines of code)
6% | 18% | 28% | 19% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c7% | 21% | 31% | 17% | 22%
h0% | 0% | 7% | 33% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
mm30% | 0% | 19% | 28% | 21%
kernel5% | 30% | 22% | 11% | 29%
pci0% | 11% | 65% | 16% | 6%
include0% | 0% | 7% | 33% | 59%
lib0% | 0% | 0% | 90% | 9%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
110 35 3
101 33 2
91 27 2
91 1 2
88 25 3
71 18 4
68 6 2
67 18 6
61 11 1
59 8 6
53 8 5
50 9 1
49 5 3
47 18 1
47 5 2
46 6 1
45 13 4
43 8 3
39 11 1
39 8 1
36 9 4
36 4 5
35 5 2
34 8 3
32 5 1
32 4 1
32 1 1
31 9 2
31 3 3
30 9 4
30 9 4
27 5 1
24 5 2
24 3 2
23 4 3
23 1 1
22 7 1
22 2 2
21 7 3
21 2 3
21 5 1
20 3 3
20 2 1
20 6 5
20 1 3
19 3 1
19 2 1
19 3 1
19 6 1
19 3 2