facebook / fbtftp
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 66 units with 574 lines of code in units (72.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (216 lines of code)
    • 13 small units (185 lines of code)
    • 47 very small units (173 lines of code)
0% | 0% | 37% | 32% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 37% | 32% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
fbtftp0% | 0% | 40% | 34% | 25%
tools0% | 0% | 30% | 25% | 43%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
42 7 1
42 6 6
37 15 4
36 8 1
36 5 1
23 3 1
20 5 1
20 5 1
16 2 2
16 6 2
15 3 1
14 4 2
14 2 1
13 3 1
12 4 1
12 1 4
11 1 0
11 3 2
11 1 1
10 4 2
9 1 1
8 1 0
8 3 2
8 4 1
6 2 1
6 1 3
5 1 2
5 2 1
5 1 1
5 1 2
5 1 2
5 2 1
4 2 1
4 1 2
4 1 1
4 1 1
4 2 1
3 1 1
3 1 1
3 1 1
3 1 1
3 1 3
3 1 3
3 1 2
3 1 1
3 1 2
3 1 1
2 1 1
2 1 1
2 1 1