facebookincubator / fbjni
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 438 units with 2,477 lines of code in units (42.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 9 medium size units (248 lines of code)
    • 33 small units (462 lines of code)
    • 395 very small units (1,716 lines of code)
0% | 2% | 10% | 18% | 69%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp0% | 5% | 20% | 34% | 39%
h0% | 0% | 2% | 9% | 87%
java0% | 0% | 17% | 9% | 73%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
cxx/fbjni/detail0% | 2% | 9% | 15% | 72%
cxx/fbjni0% | 0% | 12% | 23% | 63%
java/com/facebook/jni0% | 0% | 17% | 9% | 73%
cxx/lyra0% | 0% | 10% | 44% | 44%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
51 10 4
41 12 1
33 11 2
32 10 2
30 8 2
25 11 2
23 4 0
22 6 6
21 4 1
21 3 1
20 2 0
20 3 1
18 2 0
18 6 2
17 5 1
16 4 2
16 3 1
16 4 0
15 3 0
15 5 2
14 4 0
14 3 1
14 3 2
14 1 6
14 5 5
14 3 2
14 4 1
13 2 1
13 1 6
13 2 0
13 1 5
12 3 0
12 3 1
12 1 6
12 9 2
12 3 1
12 1 3
12 2 1
12 3 0
12 2 0
11 3 2
11 3 1
11 1 5
10 3 2
10 1 2
10 1 5
10 1 0
10 2 4
10 3 0
10 3 5