facebook / between-meals
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 139 units with 1,092 lines of code in units (52.9% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (125 lines of code)
    • 5 medium size units (177 lines of code)
    • 20 small units (299 lines of code)
    • 112 very small units (491 lines of code)
0% | 11% | 16% | 27% | 44%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 11% | 16% | 27% | 44%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/between_meals0% | 14% | 15% | 34% | 35%
lib/between_meals/repo0% | 15% | 11% | 25% | 48%
lib/between_meals/changes0% | 0% | 38% | 20% | 41%
lib/between_meals/repo/hg0% | 0% | 0% | 28% | 71%
lib/between_meals/repo/svn0% | 0% | 0% | 0% | 100%
lib/between_meals/repo/git0% | 0% | 0% | 0% | 100%
spec0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
69 6 0
56 7 1
44 8 1
41 8 3
38 9 1
30 14 1
24 3 2
20 6 5
20 3 1
18 2 0
18 4 3
18 3 2
17 4 2
17 3 2
17 3 0
17 3 2
15 6 1
15 2 1
14 2 1
13 2 1
13 4 0
12 1 2
11 2 0
11 1 1
11 2 1
11 2 1
11 2 1
10 2 2
10 2 2
10 2 2
10 2 0
9 3 3
9 3 3
9 4 2
9 2 1
9 2 1
9 1 0
8 1 0
8 1 0
8 1 1
8 3 2
8 2 1
7 2 0
7 2 1
7 2 1
7 2 0
7 2 1
6 2 1
6 2 3
6 2 1