Linux / Drivers / I3c
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 321 units with 6,587 lines of code in units (75.6% of code).
    • 3 very long units (338 lines of code)
    • 26 long units (1,621 lines of code)
    • 83 medium size units (2,561 lines of code)
    • 94 small units (1,307 lines of code)
    • 115 very small units (760 lines of code)
5% | 24% | 38% | 19% | 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% | 24% | 38% | 19% | 11%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
master6% | 26% | 41% | 14% | 11%
ROOT0% | 19% | 30% | 37% | 12%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
122 26 1
110 13 1
106 14 2
90 22 2
83 17 4
75 13 1
73 15 1
70 9 1
68 11 1
66 12 1
65 16 3
62 9 1
62 14 2
62 9 3
61 11 1
61 12 1
60 21 2
60 13 5
60 9 3
59 17 3
56 7 1
56 14 1
56 17 2
55 10 5
54 12 3
53 17 2
52 11 3
51 9 1
51 12 3
50 8 1
49 12 1
48 12 3
48 8 1
47 12 3
47 5 1
42 7 9
42 13 2
41 7 5
41 16 4
40 8 3
40 5 2
38 12 1
38 28 2
38 7 2
38 6 2
37 12 1
37 7 2
36 7 1
36 4 1
36 7 1