microsoft / vscode-debugadapter-node
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 197 units with 1,595 lines of code in units (54.0% of code).
    • 1 very long units (105 lines of code)
    • 0 long units (0 lines of code)
    • 14 medium size units (418 lines of code)
    • 29 small units (394 lines of code)
    • 153 very small units (678 lines of code)
6% | 0% | 26% | 24% | 42%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts6% | 0% | 26% | 24% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
adapter/src10% | 0% | 17% | 22% | 48%
src0% | 0% | 58% | 18% | 22%
testSupport/src0% | 0% | 28% | 33% | 38%
adapter/src/web0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
protected dispatchRequest()
in adapter/src/debugSession.ts
105 46 1
private _handleData()
in adapter/src/protocol.ts
37 10 1
function Module()
in src/generator.ts
37 7 2
function propertyType()
in src/generator.ts
35 14 1
protected initializeRequest()
in adapter/src/debugSession.ts
34 1 2
function comment()
in src/generator.ts
34 11 1
private handleData()
in testSupport/src/protocolClient.ts
31 8 1
export function runDebugAdapter()
in adapter/src/runDebugAdapter.ts
28 4 1
function Interface()
in src/generator.ts
28 13 3
public start()
in testSupport/src/debugClient.ts
28 4 1
protected sendErrorResponse()
in adapter/src/debugSession.ts
27 6 5
public log()
in adapter/src/internalLogger.ts
26 11 3
public assertOutput()
in testSupport/src/debugClient.ts
25 6 3
public async setup()
in adapter/src/internalLogger.ts
24 4 1
public hitBreakpoint()
in testSupport/src/debugClient.ts
24 5 4
public sendRequest()
in adapter/src/protocol.ts
20 5 4
public assertStoppedLocation()
in testSupport/src/debugClient.ts
20 5 4
constructor()
in testSupport/src/debugClient.ts
18 3 5
public constructor()
in adapter/src/debugSession.ts
17 3 2
get event()
in adapter/src/protocol.ts
17 2 0