microsoft / vscode-proxy-agent
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 30 units with 540 lines of code in units (92.8% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (159 lines of code)
    • 3 medium size units (119 lines of code)
    • 12 small units (186 lines of code)
    • 13 very small units (76 lines of code)
0% | 29% | 22% | 34% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 29% | 22% | 34% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 29% | 22% | 34% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async callback()
in src/agent.ts
92 25 2
67 17 7
49 1 5
function patched()
in src/index.ts
47 31 3
23 7 1
20 7 1
20 4 4
19 5 1
18 2 0
18 4 0
16 2 0
14 5 1
13 5 4
12 3 2
12 3 1
12 3 1
12 4 0
10 5 4
function cacheProxy()
in src/index.ts
9 2 2
9 3 6