Linux / Drivers / Pcmcia
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 609 units with 11,990 lines of code in units (72.4% of code).
    • 5 very long units (553 lines of code)
    • 47 long units (3,252 lines of code)
    • 131 medium size units (4,063 lines of code)
    • 161 small units (2,395 lines of code)
    • 265 very small units (1,727 lines of code)
4% | 27% | 33% | 19% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c4% | 26% | 34% | 19% | 14%
h0% | 40% | 20% | 25% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT4% | 27% | 33% | 19% | 14%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
119 28 1
113 36 1
108 16 1
107 21 1
106 32 2
100 22 2
100 31 3
96 16 2
93 39 2
93 15 2
89 14 1
84 18 1
82 14 1
81 14 2
81 24 1
81 22 1
80 38 2
78 17 2
76 19 2
73 16 1
72 29 2
71 26 2
71 34 2
70 11 1
70 19 6
70 17 3
69 24 3
68 20 3
66 12 1
66 26 1
66 10 1
65 17 2
65 8 1
64 13 5
62 28 2
62 19 2
62 23 1
60 13 1
60 18 2
58 17 6
57 14 2
56 12 1
56 27 1
54 18 1
54 15 2
54 13 2
54 12 5
54 17 2
54 12 4
52 20 2