Linux / Arch / Parisc
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 761 units with 10,857 lines of code in units (25.7% of code).
    • 7 very long units (1,155 lines of code)
    • 27 long units (1,770 lines of code)
    • 88 medium size units (2,754 lines of code)
    • 182 small units (2,513 lines of code)
    • 457 very small units (2,665 lines of code)
10% | 16% | 25% | 23% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c12% | 17% | 27% | 22% | 19%
h0% | 4% | 10% | 24% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
kernel11% | 15% | 30% | 24% | 18%
mm36% | 19% | 12% | 19% | 12%
lib0% | 33% | 12% | 12% | 42%
boot0% | 27% | 34% | 27% | 10%
include0% | 4% | 10% | 25% | 59%
math-emu0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
233 1 1
224 80 1
192 50 2
146 19 1
132 17 5
117 33 3
111 17 5
89 16 3
88 10 1
85 4 3
83 6 2
83 17 1
82 16 1
81 16 5
73 17 1
68 4 3
66 21 4
64 10 3
64 10 3
62 7 4
60 9 3
59 5 2
59 16 1
58 9 1
57 3 1
56 11 2
56 4 1
56 9 1
55 11 1
54 11 2
53 11 3
53 10 3
53 6 6
53 19 3
48 8 1
48 3 1
47 1 5
47 9 1
47 6 1
46 12 1
46 17 4
46 8 1
46 8 3
45 5 1
44 20 5
42 10 3
42 3 1
41 2 2
41 3 3
40 8 1