Linux / Drivers / Hsi
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 243 units with 4,460 lines of code in units (82.7% of code).
    • 0 very long units (0 lines of code)
    • 16 long units (1,037 lines of code)
    • 55 medium size units (1,711 lines of code)
    • 68 small units (1,032 lines of code)
    • 104 very small units (680 lines of code)
0% | 23% | 38% | 23% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 23% | 38% | 23% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
controllers0% | 32% | 38% | 19% | 9%
clients0% | 17% | 43% | 24% | 15%
ROOT0% | 25% | 5% | 31% | 37%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
96 13 1
94 17 2
89 14 1
71 5 2
70 4 2
66 7 4
63 7 1
63 10 2
55 11 2
54 12 4
54 5 1
54 11 2
53 8 1
53 11 1
51 17 3
51 8 1
50 7 1
49 7 1
48 12 4
48 2 2
47 10 3
44 8 2
44 3 2
43 5 2
43 9 1
42 8 3
40 9 4
38 6 2
36 6 1
36 4 2
36 8 1
36 4 1
35 5 2
34 7 2
34 5 1
33 4 1
32 5 2
31 4 1
30 7 2
29 3 2
29 2 1
29 6 2
29 5 4
28 3 1
28 4 1
28 5 2
28 4 1
27 3 1
27 4 1
26 3 1