microsoft / checkedc-parson
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 110 units with 1,977 lines of code in units (74.2% of code).
    • 1 very long units (136 lines of code)
    • 8 long units (574 lines of code)
    • 15 medium size units (462 lines of code)
    • 44 small units (595 lines of code)
    • 42 very small units (210 lines of code)
6% | 29% | 23% | 30% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c6% | 29% | 23% | 30% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT6% | 29% | 23% | 30% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
136 39 3
98 1 1
92 7 1
75 39 3
66 17 1
62 12 2
62 1 1
61 20 1
58 17 1
50 10 1
46 10 2
45 11 1
39 13 3
36 17 2
31 6 1
30 3 2
28 11 2
24 8 2
24 19 2
23 7 1