facebook / chef-utils
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 62 units with 684 lines of code in units (75.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (65 lines of code)
    • 7 medium size units (174 lines of code)
    • 15 small units (238 lines of code)
    • 39 very small units (207 lines of code)
0% | 9% | 25% | 34% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rb0% | 9% | 25% | 34% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 10% | 26% | 34% | 28%
sample_hooks0% | 0% | 0% | 31% | 68%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
65 12 0
31 5 0
25 9 1
25 5 0
25 8 0
24 7 1
22 5 0
22 4 1
20 6 0
19 4 1
18 1 0
18 1 0
18 5 0
18 3 0
17 1 2
16 4 1
16 1 0
15 3 0
15 6 0
13 3 2
13 3 0
11 3 2
11 3 0
10 3 0
10 3 1
10 2 0
9 2 0
9 3 0
9 2 1
8 1 1
8 2 2
8 3 1
7 2 0
7 2 1
7 2 0
7 3 1
7 1 0
6 2 1
6 1 1
5 1 0
4 1 0
4 1 2
4 2 1
4 2 0
4 1 2
4 2 0
4 2 1
4 1 1
3 2 2
3 1 0