facebook / Recipes-for-AutoPkg
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 54 units with 1,602 lines of code in units (45.2% of code).
    • 0 very long units (0 lines of code)
    • 11 long units (839 lines of code)
    • 13 medium size units (408 lines of code)
    • 19 small units (285 lines of code)
    • 11 very small units (70 lines of code)
0% | 52% | 25% | 17% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 52% | 25% | 17% | 4%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Chef_Processors0% | 78% | 16% | 4% | 0%
Xcode0% | 53% | 30% | 12% | 3%
android_sdk0% | 29% | 39% | 29% | 2%
AdoptOpenJDK0% | 0% | 91% | 0% | 8%
Shared_Processors0% | 0% | 24% | 66% | 8%
Duo0% | 0% | 64% | 35% | 0%
Acrolinx0% | 0% | 0% | 100% | 0%
Mosh0% | 0% | 0% | 100% | 0%
SQLDeveloper0% | 0% | 0% | 52% | 47%
LobbyVideo0% | 0% | 0% | 100% | 0%
Intellij0% | 0% | 0% | 0% | 100%
android_ndk0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
85 6 1
82 18 6
79 6 1
79 6 1
79 6 1
79 6 1
79 6 1
79 6 1
77 10 1
68 3 1
53 13 1
47 2 1
46 2 1
45 12 1
33 4 1
31 12 6
29 5 1
28 3 1
27 7 1
27 6 1
26 7 1
25 5 1
23 2 2
21 9 1
20 4 1
19 4 1
18 3 1
18 4 1
18 7 2
17 2 1
16 2 1
16 6 2
15 6 1
15 3 1
14 2 1
14 4 1
13 2 1
13 3 1
12 2 1
12 4 2
12 2 1
12 3 1
11 2 1
10 3 4
10 2 1
10 2 1
9 1 1
8 2 1
8 1 2
5 1 2