Linux / Drivers / Cxl
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 114 units with 1,832 lines of code in units (62.4% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (111 lines of code)
    • 33 medium size units (1,026 lines of code)
    • 23 small units (352 lines of code)
    • 56 very small units (343 lines of code)
0% | 6% | 56% | 19% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 6% | 56% | 19% | 18%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 6% | 58% | 22% | 12%
core0% | 5% | 53% | 16% | 24%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
59 10 2
52 8 6
49 8 3
49 18 3
49 8 2
47 6 3
42 4 3
39 12 2
38 5 1
38 7 1
37 7 3
37 5 2
35 7 1
34 7 1
34 10 2
33 7 2
31 3 1
31 6 1
28 2 1
28 8 3
28 5 4
28 6 2
25 4 3
24 6 2
23 6 6
23 2 1
23 5 3
23 4 3
22 4 1
22 4 2
22 3 4
21 5 2
21 6 2
21 4 3
21 3 2
20 5 4
20 4 2
19 3 3
18 3 1
18 3 2
17 3 1
17 3 3
17 4 1
16 2 3
16 7 1
16 3 1
16 2 1
15 2 1
15 3 2
15 6 1