korosuke613 / etrobocon2019
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 137 units with 1,311 lines of code in units (54.6% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (199 lines of code)
    • 8 medium size units (225 lines of code)
    • 35 small units (501 lines of code)
    • 91 very small units (386 lines of code)
0% | 15% | 17% | 38% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
c0% | 18% | 18% | 43% | 20%
cpp0% | 0% | 13% | 12% | 74%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ev3-api0% | 16% | 16% | 40% | 26%
src0% | 0% | 25% | 11% | 62%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
74 18 4
70 18 5
55 15 1
46 9 2
36 11 2
30 4 2
24 7 3
24 4 0
23 5 2
21 6 4
21 5 3
20 2 4
20 3 1
19 4 4
19 7 1
18 2 2
18 3 0
17 5 1
17 2 1
17 2 0
17 2 0
16 2 0
16 3 2
15 1 1
15 1 2
15 1 2
14 7 2
14 1 1
13 1 2
13 7 3
13 7 1
13 7 3
13 7 1
13 1 2
12 3 1
12 2 3
12 3 1
12 2 1
11 5 3
11 1 1
11 1 1
11 1 1
11 1 1
11 1 1
11 1 1
11 1 3
10 1 1
10 1 1
10 1 1
10 3 1