Linux / Drivers / Pps
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 53 units with 939 lines of code in units (74.4% of code).
    • 1 very long units (106 lines of code)
    • 2 long units (113 lines of code)
    • 11 medium size units (381 lines of code)
    • 11 small units (165 lines of code)
    • 28 very small units (174 lines of code)
11% | 12% | 40% | 17% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c11% | 12% | 40% | 17% | 18%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT23% | 0% | 44% | 7% | 23%
clients0% | 31% | 29% | 26% | 12%
generators0% | 0% | 57% | 26% | 16%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
106 24 3
61 6 1
52 9 1
47 8 1
44 5 1
42 6 1
42 7 4
33 5 3
32 3 1
32 5 2
29 7 1
29 5 2
29 4 1
22 3 1
19 2 1
19 2 1
18 6 3
17 10 2
16 3 1
14 3 1
13 4 2
13 2 1
13 3 2
12 2 1
11 1 1
10 2 3
10 2 3
9 1 1
9 2 1
9 3 3
9 2 1
8 1 2
8 2 1
7 1 1
7 1 2
7 3 3
6 1 1
6 1 1
6 1 3
6 1 3
6 1 3
6 1 3
6 1 2
6 1 1
5 1 3
5 1 1
5 1 1
5 1 1
4 1 1
4 1 1