Linux / Arch / Csky
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 442 units with 4,871 lines of code in units (46.1% of code).
    • 0 very long units (0 lines of code)
    • 10 long units (627 lines of code)
    • 51 medium size units (1,399 lines of code)
    • 91 small units (1,285 lines of code)
    • 290 very small units (1,560 lines of code)
0% | 12% | 28% | 26% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 15% | 31% | 26% | 26%
h0% | 0% | 9% | 26% | 64%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
kernel0% | 7% | 32% | 30% | 30%
abiv20% | 44% | 14% | 17% | 24%
lib0% | 82% | 0% | 0% | 17%
abiv10% | 20% | 18% | 21% | 39%
mm0% | 8% | 41% | 23% | 26%
include0% | 0% | 14% | 28% | 56%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
76 2 1
72 16 1
69 19 1
67 1 3
63 1 3
63 1 1
55 15 1
55 1 1
55 1 1
52 2 1
44 8 5
43 10 4
39 6 3
37 4 3
37 6 2
36 10 1
35 9 3
35 4 2
35 9 3
33 10 1
32 4 5
32 3 1
31 8 4
31 4 2
28 9 1
28 2 2
28 5 1
28 6 2
27 2 1
27 7 2
26 4 3
26 4 1
26 5 3
26 3 1
26 3 1
25 4 3
25 7 3
25 7 3
25 3 1
25 8 3
25 7 1
24 3 1
24 2 1
24 7 1
24 4 2
24 6 2
24 1 1
23 5 3
23 5 3
23 4 6