facebookincubator / dhcplb
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 1,113 lines of code in units (71.4% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (238 lines of code)
    • 20 medium size units (603 lines of code)
    • 9 small units (121 lines of code)
    • 33 very small units (151 lines of code)
0% | 21% | 54% | 10% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
go0% | 21% | 54% | 10% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 16% | 57% | 12% | 13%
ROOT0% | 52% | 34% | 0% | 13%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
73 14 1
57 14 1
54 9 1
54 16 4
47 8 3
47 9 0
39 7 2
36 10 2
36 8 1
36 8 3
33 6 1
31 5 1
29 3 3
28 6 1
27 4 1
27 4 1
26 6 4
25 4 1
25 8 1
23 5 1
23 4 3
22 4 1
22 4 1
21 4 1
19 4 1
14 4 3
14 4 4
14 4 2
14 2 1
12 3 2
12 2 1
11 3 2
11 2 1
10 2 1
9 3 1
9 2 1
8 1 1
8 1 3
7 2 1
7 1 1
6 3 1
6 1 1
6 1 1
6 2 1
5 1 1
4 1 1
3 1 0
3 1 1
3 1 1
3 1 1