microsoft / vscode-azurefunctions
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 879 units with 9,420 lines of code in units (47.5% of code).
    • 0 very long units (0 lines of code)
    • 15 long units (957 lines of code)
    • 92 medium size units (2,697 lines of code)
    • 192 small units (2,877 lines of code)
    • 580 very small units (2,889 lines of code)
0% | 10% | 28% | 30% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 9% | 28% | 30% | 31%
cs0% | 30% | 32% | 27% | 10%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/commands0% | 12% | 29% | 29% | 28%
tools/JsonCli0% | 30% | 32% | 27% | 10%
src/utils0% | 7% | 18% | 35% | 38%
src/tree0% | 7% | 25% | 24% | 42%
src/funcCoreTools0% | 15% | 33% | 33% | 17%
src/downloadAzureProject0% | 56% | 0% | 33% | 9%
src/templates0% | 0% | 33% | 32% | 33%
src/debug0% | 0% | 35% | 35% | 28%
src/vsCodeConfig0% | 0% | 32% | 41% | 25%
src0% | 0% | 37% | 18% | 44%
src/funcConfig0% | 0% | 19% | 17% | 63%
ROOT0% | 0% | 0% | 47% | 52%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private static int Main()
in tools/JsonCli/src/Program.cs
89 16 1
public async startProxy()
in src/commands/remoteDebugJava/DebugProxy.ts
78 6 1
function parseVersionRange()
in src/utils/nugetUtils.ts
74 19 1
public async createChildImpl()
in src/tree/SubscriptionTreeItem.ts
73 7 1
await callWithTelemetryAndErrorHandling()
in src/funcCoreTools/validateFuncCoreToolsIsLatest.ts
70 19 2
protected getTasks()
in src/commands/initProjectForVSCode/InitVSCodeStep/DotnetInitVSCodeStep.ts
67 1 1
public async getSubWizard()
in src/commands/createFunction/FunctionListStep.ts
63 16 1
export async function executeFunction()
in src/commands/executeFunction.ts
60 13 2
async function deploy()
in src/commands/deploy/deploy.ts
59 22 4
export async function setupProjectFolder()
in src/downloadAzureProject/setupProjectFolder.ts
57 7 3
async function startFuncTask()
in src/commands/pickFuncProcess.ts
55 12 3
export function registerCommands()
in src/commands/registerCommands.ts
54 1 0
export async function remoteDebugJavaFunctionApp()
in src/commands/remoteDebugJava/remoteDebugJavaFunctionApp.ts
54 9 2
export async function getStackPicks()
in src/commands/createFunctionApp/stacks/getStackPicks.ts
52 15 1
private void InstallRemotePackages()
in tools/JsonCli/src/Installer.cs
52 6 3
public async loadMoreChildrenImpl()
in src/tree/AzureAccountTreeItemWithProjects.ts
50 11 2
export async function uploadAppSettingsInternal()
in src/commands/appSettings/uploadAppSettings.ts
47 9 4
private async getNewSiteConfig()
in src/commands/createFunctionApp/FunctionAppCreateStep.ts
46 8 2
public async getSubWizard()
in src/commands/createNewProject/NewProjectLanguageStep.ts
46 10 1
export function parseScriptTemplate()
in src/templates/script/parseScriptTemplates.ts
45 13 3