Linux / Drivers / Isdn
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 140 units with 2,645 lines of code in units (7.8% of code).
    • 2 very long units (454 lines of code)
    • 7 long units (461 lines of code)
    • 24 medium size units (749 lines of code)
    • 37 small units (540 lines of code)
    • 70 very small units (441 lines of code)
17% | 17% | 28% | 20% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c17% | 17% | 28% | 19% | 16%
h0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
hardware69% | 0% | 15% | 5% | 9%
capi0% | 25% | 27% | 28% | 18%
mISDN0% | 19% | 40% | 19% | 20%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
264 57 6
190 40 6
79 14 1
71 12 3
68 14 2
66 8 1
61 9 2
59 9 2
57 17 2
47 11 2
45 7 1
41 9 3
40 6 1
38 5 1
38 9 1
38 11 1
38 6 1
35 6 2
34 5 2
33 4 1
31 4 1
30 2 1
29 4 2
27 3 3
27 5 5
23 6 1
23 4 1
23 6 5
22 16 1
22 5 1
22 4 1
22 5 1
21 5 3
20 4 2
19 4 1
18 4 2
18 4 2
18 4 2
18 4 2
17 1 2
17 5 2
17 5 1
17 3 1
16 2 2
16 2 2
16 2 2
16 2 1
15 4 1
15 6 4
14 3 1