Linux / Arch / Nds32
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 341 units with 5,070 lines of code in units (47.7% of code).
    • 3 very long units (469 lines of code)
    • 7 long units (412 lines of code)
    • 48 medium size units (1,419 lines of code)
    • 110 small units (1,637 lines of code)
    • 173 very small units (1,133 lines of code)
9% | 8% | 27% | 32% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c10% | 8% | 28% | 34% | 17%
h0% | 0% | 18% | 12% | 68%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
mm31% | 3% | 23% | 30% | 12%
kernel0% | 13% | 35% | 31% | 19%
include0% | 0% | 18% | 12% | 68%
math-emu0% | 0% | 8% | 68% | 23%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
183 47 4
180 28 2
106 17 2
68 23 1
67 8 2
62 5 1
57 5 1
56 5 1
51 1 1
51 2 2
50 20 5
48 1 1
48 14 5
42 8 1
42 7 5
40 8 2
39 5 1
36 2 1
36 10 3
36 7 1
34 8 1
34 10 2
33 9 2
33 7 1
32 7 2
31 5 3
29 2 1
29 3 1
29 4 1
29 7 1
28 5 1
28 10 2
27 7 2
27 2 7
27 5 1
27 5 1
26 5 3
26 7 2
25 3 1
25 6 2
25 3 3
25 4 2
25 5 1
25 2 7
25 10 2
25 3 2
25 5 2
24 3 2
24 3 2
23 4 2