microsoft / vscode-azureappservice
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 240 units with 2,704 lines of code in units (23.9% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (411 lines of code)
    • 28 medium size units (854 lines of code)
    • 44 small units (638 lines of code)
    • 161 very small units (801 lines of code)
0% | 15% | 31% | 23% | 29%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 15% | 31% | 23% | 29%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/tree0% | 25% | 22% | 25% | 27%
src/commands/createWebApp0% | 25% | 28% | 17% | 28%
src/commands/deploy0% | 15% | 42% | 23% | 18%
src/commands0% | 20% | 38% | 24% | 16%
src/commands/postDeploy0% | 0% | 73% | 10% | 16%
src/utils0% | 0% | 20% | 29% | 50%
src/commands/appSettings0% | 0% | 51% | 15% | 33%
src0% | 0% | 39% | 23% | 36%
src/commands/logstream0% | 0% | 64% | 0% | 35%
src/commands/remoteDebug0% | 0% | 48% | 51% | 0%
src/commands/connections0% | 0% | 0% | 64% | 35%
src/vsCodeConfig0% | 0% | 0% | 34% | 65%
src/commands/deployments0% | 0% | 0% | 24% | 75%
ROOT0% | 0% | 0% | 0% | 100%
src/commands/api0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export async function deploy()
in src/commands/deploy/deploy.ts
63 23 3
export async function setPostPromptDefaults()
in src/commands/createWebApp/setPostPromptDefaults.ts
61 22 2
export async function generateDeploymentScript()
in src/commands/generateDeploymentScript.ts
60 11 2
public async createChildImpl()
in src/tree/CosmosDBTreeItem.ts
60 10 1
private getAppSettings()
in src/commands/createWebApp/WebAppCreateStep.ts
59 6 1
label: localize()
in src/tree/CosmosDBTreeItem.ts
56 9 2
public async createChildImpl()
in src/tree/SubscriptionTreeItem.ts
52 6 1
export async function getStackPicks()
in src/commands/createWebApp/stacks/getStackPicks.ts
47 15 2
export async function getLinuxDetectorError()
in src/commands/postDeploy/getLinuxDetectorError.ts
47 8 6
export function registerCommands()
in src/commands/registerCommands.ts
46 1 0
private getSiteConfig()
in src/commands/createWebApp/WebAppCreateStep.ts
41 9 1
40 5 4
function shouldPromptForSurvey()
in src/commands/deploy/failureMoreInfoSurvey.ts
37 13 2
export async function checkLinuxWebAppDownDetector()
in src/commands/postDeploy/checkLinuxWebAppDownDetector.ts
37 6 4
private detectPostgresConnections()
in src/tree/CosmosDBTreeItem.ts
35 8 1
private detectDocDBConnections()
in src/tree/CosmosDBTreeItem.ts
34 9 1
export async function uploadAppSettings()
in src/commands/appSettings/uploadAppSettings.ts
32 6 2
export async function setPreDeployConfigForDotnet()
in src/commands/deploy/dotnet/setPreDeployConfigForDotnet.ts
32 6 2
function generateDotnetTasks()
in src/commands/deploy/dotnet/setPreDeployConfigForDotnet.ts
31 1 1
async function getIgnoredFoldersForDeployment()
in src/commands/deploy/promptScmDoBuildDeploy.ts
30 6 2