korosuke613 / etrobocon2017
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 235 units with 2,206 lines of code in units (52.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (178 lines of code)
    • 19 medium size units (564 lines of code)
    • 44 small units (664 lines of code)
    • 170 very small units (800 lines of code)
0% | 8% | 25% | 30% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 8% | 26% | 30% | 34%
h0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
str0% | 8% | 24% | 30% | 36%
sample0% | 0% | 62% | 24% | 13%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
96 18 0
82 15 4
50 13 3
49 8 0
43 4 3
41 4 1
41 12 2
32 9 0
31 12 0
28 5 5
26 4 2
24 6 0
23 6 1
23 12 0
23 6 1
23 6 0
22 5 1
22 6 3
21 5 1
21 5 1
21 1 1
20 4 0
20 4 0
20 5 0
20 4 0
20 5 0
19 17 0
19 1 0
19 17 0
19 4 0
19 4 0
18 2 1
18 2 1
17 1 1
17 10 2
16 3 1
16 4 0
16 4 1
16 3 1
15 2 1
15 4 0
15 1 2
15 1 2
15 2 1
15 4 0
15 5 0
15 5 0
15 4 0
14 9 2
13 1 1