relayjs / relay-devtools
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 228 units with 3,801 lines of code in units (41.1% of code).
    • 5 very long units (689 lines of code)
    • 7 long units (465 lines of code)
    • 34 medium size units (1,126 lines of code)
    • 52 small units (769 lines of code)
    • 130 very small units (752 lines of code)
18% | 12% | 29% | 20% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js18% | 12% | 29% | 20% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/devtools/views34% | 11% | 35% | 13% | 4%
src/backend0% | 69% | 0% | 17% | 13%
shells/dev/relay-app0% | 33% | 12% | 6% | 47%
packages/relay-devtools-core/src0% | 12% | 41% | 16% | 29%
src/devtools0% | 0% | 65% | 14% | 20%
shells/browser/shared0% | 0% | 15% | 39% | 44%
src/backend/util0% | 0% | 13% | 40% | 46%
src0% | 0% | 13% | 57% | 29%
shells/dev/src0% | 0% | 0% | 37% | 62%
shells0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
packages/relay-devtools0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 50 longest units
Unit# linesMcCabe index# params
179 15 3
139 30 5
131 25 7
128 9 5
112 1 2
100 10 6
79 14 7
59 2 3
59 28 1
58 2 1
58 5 4
52 3 1
50 13 3
50 4 8
47 6 0
47 8 2
40 11 2
40 2 1
39 5 3
38 3 1
36 4 4
36 14 2
36 14 2
36 5 1
35 5 1
35 3 1
35 3 1
35 5 4
35 1 4
34 6 4
33 19 3
31 1 2
29 13 1
28 2 4
28 9 1
27 5 1
27 2 1
27 2 4
26 9 2
26 9 2
25 3 6
25 2 4
24 8 0
23 4 3
22 2 0
21 1 1
20 1 1
20 4 1
20 4 0
19 5 1