Linux / Arch / Openrisc
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 173 units with 2,075 lines of code in units (29.5% of code).
    • 1 very long units (137 lines of code)
    • 4 long units (225 lines of code)
    • 18 medium size units (572 lines of code)
    • 32 small units (495 lines of code)
    • 118 very small units (646 lines of code)
6% | 10% | 27% | 23% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c8% | 13% | 31% | 18% | 28%
h0% | 0% | 14% | 43% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
mm41% | 0% | 22% | 16% | 19%
kernel0% | 17% | 33% | 19% | 28%
include0% | 0% | 14% | 43% | 42%
lib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
137 36 4
65 9 3
56 7 2
52 7 1
52 12 1
47 9 1
44 6 5
44 15 2
43 10 2
37 1 1
36 7 3
33 3 1
33 5 3
32 5 3
28 2 1
28 4 1
26 6 1
25 4 4
25 4 2
24 2 1
23 6 3
23 5 3
21 7 1
20 5 3
20 6 1
20 5 1
19 2 3
19 4 3
19 4 6
18 1 1
18 3 2
17 1 3
17 1 2
17 1 2
17 1 2
17 1 3
17 1 1
17 3 2
17 1 1
15 1 2
15 1 2
15 1 2
15 5 1
13 1 2
13 4 4
13 4 3
13 2 1
13 1 1
13 3 2
12 2 3