microsoft / vscode-mock-debug
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 85 units with 1,192 lines of code in units (81.7% of code).
    • 1 very long units (112 lines of code)
    • 2 long units (132 lines of code)
    • 16 medium size units (438 lines of code)
    • 21 small units (297 lines of code)
    • 45 very small units (213 lines of code)
9% | 11% | 36% | 24% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts9% | 11% | 36% | 24% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src9% | 11% | 36% | 24% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function activateMockDebug()
in src/activateMockDebug.ts
112 15 2
private executeLine()
in src/mockRuntime.ts
75 26 2
57 13 2
46 4 2
public constructor()
in src/mockDebug.ts
45 5 1
private convertFromRuntime()
in src/mockDebug.ts
41 8 1
30 1 2
private findNextStatement()
in src/mockRuntime.ts
27 9 2
26 7 2
24 3 2
24 4 0
23 7 2
23 4 2
public stack()
in src/mockRuntime.ts
23 4 2
22 5 2
21 3 4
21 6 3
private updateCurrentLine()
in src/mockRuntime.ts
21 4 1
21 8 1
18 2 3