Linux / Drivers / Ptp
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 277 units with 5,284 lines of code in units (60.5% of code).
    • 1 very long units (290 lines of code)
    • 7 long units (488 lines of code)
    • 80 medium size units (2,426 lines of code)
    • 100 small units (1,483 lines of code)
    • 89 very small units (597 lines of code)
5% | 9% | 45% | 28% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c5% | 9% | 46% | 28% | 11%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT5% | 9% | 45% | 28% | 11%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
290 94 3
100 26 5
85 19 3
74 9 1
66 18 1
58 20 2
54 11 2
51 8 1
50 9 3
49 8 2
47 10 1
47 8 1
47 15 4
47 11 4
46 10 4
45 10 4
45 13 2
45 13 2
44 7 2
43 9 2
41 7 2
40 7 3
39 8 3
38 4 3
38 5 2
38 7 4
37 5 2
36 8 2
35 5 1
34 7 4
34 9 3
33 5 2
32 4 2
32 9 1
32 5 1
32 8 3
32 5 1
31 5 1
31 5 2
30 5 2
30 5 3
30 8 3
29 3 2
29 8 4
28 5 2
27 4 3
27 3 4
27 4 1
27 5 3
27 6 2