microsoft / vscode-java-test
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 140 units with 2,182 lines of code in units (78.9% of code).
    • 0 very long units (0 lines of code)
    • 8 long units (550 lines of code)
    • 21 medium size units (658 lines of code)
    • 38 small units (590 lines of code)
    • 73 very small units (384 lines of code)
0% | 25% | 30% | 27% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 25% | 30% | 26% | 16%
js0% | 0% | 0% | 36% | 63%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/runners/junitRunner0% | 63% | 0% | 23% | 12%
src/controller0% | 26% | 29% | 32% | 11%
src/runners/baseRunner0% | 48% | 17% | 15% | 18%
src/commands/navigation0% | 64% | 0% | 22% | 13%
src/utils0% | 27% | 39% | 27% | 5%
src/commands0% | 11% | 45% | 32% | 10%
src0% | 0% | 56% | 0% | 43%
src/runners/testngRunner0% | 0% | 59% | 15% | 25%
src/provider0% | 0% | 0% | 32% | 67%
src/runners0% | 0% | 0% | 71% | 28%
scripts0% | 0% | 0% | 42% | 57%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export const runTests:()
in src/controller/testController.ts
99 14 2
public processData()
in src/runners/junitRunner/JUnitRunnerResultAnalyzer.ts
90 34 1
private enlistToTestMapping()
in src/runners/junitRunner/JUnitRunnerResultAnalyzer.ts
75 15 1
public async run()
in src/runners/baseRunner/BaseRunner.ts
60 10 3
export async function navigateToTestOrTarget()
in src/commands/navigation/navigationCommands.ts
58 17 1
async function startWatchingWorkspace()
in src/controller/testController.ts
57 14 0
57 18 3
async function downloadJar()
in src/commands/testDependenciesCommands.ts
54 2 7
public processData()
in src/runners/testngRunner/TestNGRunnerResultAnalyzer.ts
49 13 1
function mergeTestMethods()
in src/controller/testController.ts
42 11 1
41 4 1
export async function registerAdvanceAskForChoice()
in src/commands/askForOptionCommands.ts
40 3 1
async function setupUnmanagedFolder()
in src/commands/testDependenciesCommands.ts
40 10 2
async function doActivate()
in src/extension.ts
40 8 2
function getJarIds()
in src/commands/testDependenciesCommands.ts
37 4 1
37 10 2
export async function runTestsFromJavaProjectExplorer()
in src/commands/projectExplorerCommands.ts
36 11 2
export async function loadRunConfig()
in src/utils/configUtils.ts
31 8 1
async function selectQuickPick()
in src/utils/configUtils.ts
29 7 2
26 7 1