facebookincubator / glTFVariantMeld
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 42 units with 510 lines of code in units (24.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (60 lines of code)
    • 4 medium size units (102 lines of code)
    • 15 small units (215 lines of code)
    • 22 very small units (133 lines of code)
0% | 11% | 20% | 42% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
rs0% | 13% | 16% | 48% | 20%
ts0% | 0% | 40% | 0% | 59%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
native/src/work_asset0% | 19% | 23% | 44% | 12%
web/cli/src0% | 0% | 40% | 0% | 59%
native/src/meld_keys0% | 0% | 0% | 57% | 42%
native/src/extension0% | 0% | 0% | 100% | 0%
native/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 42 longest units
Unit# linesMcCabe index# params
60 10 3
33 7 3
27 4 1
21 4 3
21 6 2
20 3 1
18 1 2
18 4 3
15 2 2
15 2 3
15 4 1
15 4 1
14 3 1
13 2 3
13 2 3
13 1 2
12 2 2
12 3 1
11 2 2
11 2 3
10 1 3
9 1 1
9 1 3
9 2 1
8 1 2
7 1 2
7 1 1
7 1 1
7 2 1
6 1 1
6 1 1
6 1 2
6 2 2
6 1 2
6 2 1
4 1 2
4 1 2
4 1 1
3 1 1
3 1 1
3 2 2
3 1 2