facebookincubator / gazebo
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 130 units with 1,305 lines of code in units (47.6% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (176 lines of code)
    • 14 medium size units (388 lines of code)
    • 19 small units (265 lines of code)
    • 94 very small units (476 lines of code)
0% | 13% | 29% | 20% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 13% | 29% | 20% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
gazebo/src0% | 12% | 18% | 24% | 44%
gazebo_derive/src0% | 16% | 58% | 14% | 11%
gazebo/src/ext0% | 12% | 19% | 20% | 47%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
66 20 0
58 14 1
52 4 1
45 1 2
36 4 2
29 1 2
29 1 0
28 1 1
28 1 2
28 3 3
27 1 0
25 3 1
24 1 1
23 3 2
23 2 1
22 2 0
21 3 3
20 1 2
20 1 2
18 1 0
16 5 3
16 1 0
15 1 0
15 2 1
14 2 1
13 3 2
13 1 1
13 1 0
12 1 0
12 1 0
12 1 0
12 1 0
11 1 2
11 1 1
11 2 1
11 1 0
10 1 1
10 1 1
10 2 1
9 1 1
9 1 0
9 1 2
9 3 1
8 1 1
8 4 1
8 1 0
8 1 0
8 2 2
8 1 0
8 1 0