facebook / prophet
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 144 units with 2,971 lines of code in units (71.0% of code).
    • 3 very long units (387 lines of code)
    • 10 long units (676 lines of code)
    • 42 medium size units (1,285 lines of code)
    • 23 small units (324 lines of code)
    • 66 very small units (299 lines of code)
13% | 22% | 43% | 10% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py13% | 22% | 43% | 10% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
python/prophet13% | 24% | 43% | 8% | 8%
python0% | 0% | 41% | 26% | 31%
python/scripts0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
143 42 2
126 5 2
118 15 11
88 13 2
82 15 5
72 17 2
70 13 3
67 21 3
62 22 7
62 17 2
61 10 3
60 19 2
52 15 2
49 13 3
48 9 6
42 16 1
40 15 1
40 1 2
40 15 5
40 6 1
38 9 3
38 6 2
38 18 3
37 1 2
36 14 4
36 16 1
36 8 1
35 13 6
35 5 2
35 1 2
30 7 3
29 5 2
29 9 7
28 7 4
28 9 3
27 8 4
27 9 5
26 8 1
26 8 5
26 9 2
25 6 6
25 7 2
24 6 6
24 1 2
24 3 1
23 1 2
23 6 4
23 9 4
23 6 5
23 5 2