Linux / Arch / Ia64
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 461 units with 6,596 lines of code in units (15.5% of code).
    • 2 very long units (348 lines of code)
    • 17 long units (1,116 lines of code)
    • 70 medium size units (2,041 lines of code)
    • 109 small units (1,580 lines of code)
    • 263 very small units (1,511 lines of code)
5% | 16% | 30% | 23% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c5% | 18% | 33% | 24% | 17%
h0% | 0% | 0% | 17% | 82%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
kernel7% | 16% | 33% | 23% | 17%
hp0% | 42% | 26% | 22% | 7%
mm0% | 21% | 29% | 32% | 16%
lib0% | 57% | 0% | 0% | 42%
pci0% | 0% | 55% | 28% | 15%
uv0% | 0% | 77% | 22% | 0%
include0% | 0% | 0% | 17% | 82%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
240 1 1
108 17 1
87 23 4
86 6 1
81 29 5
72 10 1
65 7 5
65 20 2
65 11 1
63 19 2
63 12 1
62 15 1
61 5 6
61 12 1
60 13 3
59 13 2
58 6 5
55 6 1
53 18 2
49 8 3
47 12 1
45 9 11
43 6 2
42 6 1
41 5 10
41 7 2
38 4 2
38 5 1
38 10 5
37 7 1
36 6 2
36 8 1
35 10 1
35 11 2
34 7 1
34 6 1
33 6 1
32 1 1
32 10 4
31 6 1
30 7 1
30 3 5
30 11 2
30 6 1
30 9 2
30 5 2
30 15 5
29 4 1
29 12 1
29 7 1