facebookincubator / isometric_pattern_matcher
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 150 units with 1,768 lines of code in units (66.1% of code).
    • 1 very long units (118 lines of code)
    • 3 long units (179 lines of code)
    • 28 medium size units (934 lines of code)
    • 14 small units (209 lines of code)
    • 104 very small units (328 lines of code)
6% | 10% | 52% | 11% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
h16% | 9% | 29% | 11% | 33%
cpp0% | 10% | 69% | 11% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
IsometricPatternMatcher6% | 10% | 52% | 11% | 18%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
118 15 4
66 18 1
59 8 7
54 10 7
50 8 2
49 12 4
49 8 5
47 4 2
47 9 7
44 6 3
43 13 5
42 12 6
41 10 9
41 15 4
40 6 8
35 12 2
29 1 0
29 3 1
29 7 5
29 5 4
28 8 3
28 4 1
27 3 3
26 6 4
25 10 2
25 4 0
23 2 1
23 3 3
22 7 1
21 2 1
21 5 2
21 3 0
19 1 11
19 5 1
18 1 0
18 4 2
17 2 1
16 3 0
15 2 5
14 4 2
13 1 0
13 5 1
13 4 6
12 3 0
11 2 3
11 3 1
10 1 1
9 1 2
9 2 1
9 6 1