facebookincubator / FBX2glTF
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 168 units with 3,381 lines of code in units (57.3% of code).
    • 8 very long units (1,413 lines of code)
    • 7 long units (380 lines of code)
    • 19 medium size units (600 lines of code)
    • 28 small units (459 lines of code)
    • 106 very small units (529 lines of code)
41% | 11% | 17% | 13% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp48% | 11% | 18% | 12% | 9%
js0% | 100% | 0% | 0% | 0%
hpp0% | 0% | 12% | 26% | 61%
py0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/fbx56% | 20% | 10% | 7% | 5%
src85% | 0% | 0% | 3% | 10%
src/fbx/materials70% | 16% | 0% | 12% | 1%
src/raw20% | 7% | 33% | 18% | 20%
src/gltf34% | 0% | 19% | 18% | 27%
npm/fbx2gltf0% | 100% | 0% | 0% | 0%
src/gltf/properties0% | 0% | 42% | 23% | 33%
src/utils0% | 0% | 23% | 35% | 41%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
326 36 4
315 60 2
182 49 3
139 43 4
124 26 4
121 28 0
105 33 1
101 21 0
57 28 4
56 6 3
55 17 3
55 10 5
55 11 0
51 10 0
51 6 4
46 9 2
45 17 1
44 14 6
41 12 0
36 10 0
34 7 4
33 4 3
32 8 4
31 6 3
31 10 1
30 7 6
29 8 2
29 13 1
26 6 1
24 4 2
24 9 1
23 6 0
21 6 3
21 2 2
20 6 0
20 2 1
20 1 7
20 3 3
20 7 1
19 3 1
19 9 4
19 3 4
19 8 1
18 5 0
18 5 2
18 1 6
17 3 6
17 4 2
17 5 1
16 4 2