microsoft / vscode-java-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 186 units with 2,528 lines of code in units (86.8% of code).
    • 2 very long units (269 lines of code)
    • 5 long units (296 lines of code)
    • 25 medium size units (780 lines of code)
    • 42 small units (618 lines of code)
    • 112 very small units (565 lines of code)
10% | 11% | 30% | 24% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts10% | 11% | 31% | 24% | 21%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src10% | 11% | 31% | 24% | 21%
scripts/build0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
162 50 3
export function getProcesses()
in src/processTree.ts
107 28 5
74 24 4
public async provideInlineValues()
in src/JavaInlineValueProvider.ts
58 11 3
57 19 2
async function runJavaFile()
in src/extension.ts
56 22 2
private async fixMainClass()
in src/configurationProvider.ts
51 7 4
async function applyHCR()
in src/extension.ts
49 15 1
private provideDebugConfigurationsAsync()
in src/configurationProvider.ts
48 7 2
47 10 1
46 12 1
43 4 2
39 11 1
private async resolveMainClass()
in src/configurationProvider.ts
33 12 2
31 8 3
private async resolvePath()
in src/configurationProvider.ts
30 8 5
constructor()
in src/debugCodeLensProvider.ts
29 11 0
async function constructDebugConfig()
in src/debugCodeLensProvider.ts
29 9 3
public async showQuickPick()
in src/mainClassPicker.ts
28 9 4
private showNativeProgress()
in src/progressImpl.ts
28 3 0