Linux / Drivers / Soundwire
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 278 units with 6,413 lines of code in units (77.0% of code).
    • 3 very long units (375 lines of code)
    • 24 long units (1,632 lines of code)
    • 78 medium size units (2,555 lines of code)
    • 82 small units (1,257 lines of code)
    • 91 very small units (594 lines of code)
5% | 25% | 39% | 19% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c5% | 25% | 40% | 19% | 8%
h0% | 0% | 0% | 40% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT5% | 25% | 39% | 19% | 9%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
138 32 1
126 27 1
111 20 2
93 8 5
92 15 3
89 22 3
88 15 1
84 21 2
76 15 1
74 11 1
74 8 3
72 14 1
69 12 1
69 6 1
66 13 3
62 13 2
61 14 1
61 7 4
61 15 4
60 12 1
59 9 2
57 7 3
56 10 2
55 17 1
52 4 1
51 11 1
51 9 2
50 9 1
50 11 3
50 5 3
49 6 2
49 11 2
49 10 3
49 13 2
48 5 1
46 13 2
45 11 2
45 14 1
44 9 1
44 11 1
44 7 4
43 5 5
42 3 4
41 12 1
38 4 2
38 9 1
38 10 7
38 4 2
38 7 3
37 3 2