microsoft / vscode-azuretools
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 944 units with 9,149 lines of code in units (40.9% of code).
    • 0 very long units (0 lines of code)
    • 11 long units (682 lines of code)
    • 89 medium size units (2,732 lines of code)
    • 166 small units (2,419 lines of code)
    • 678 very small units (3,316 lines of code)
0% | 7% | 29% | 26% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 7% | 29% | 26% | 35%
js0% | 0% | 33% | 26% | 40%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
appservice/src0% | 10% | 29% | 28% | 31%
ui/src0% | 10% | 27% | 24% | 38%
databases/src0% | 0% | 31% | 29% | 38%
dev/src0% | 0% | 42% | 20% | 37%
triage-actions/common0% | 0% | 51% | 0% | 48%
triage-actions/api0% | 0% | 16% | 40% | 43%
triage-actions/needs-more-info-closer0% | 0% | 64% | 8% | 26%
triage-actions/locker0% | 0% | 60% | 0% | 39%
triage-actions/stale-closer0% | 0% | 32% | 36% | 30%
kudu/src0% | 0% | 23% | 16% | 60%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export async function deploy()
in appservice/src/deploy/deploy.ts
83 25 3
function handleError()
in ui/src/callWithTelemetryAndErrorHandling.ts
74 20 3
public async loadMoreChildrenImpl()
in ui/src/tree/AzureAccountTreeItemBase.ts
70 11 2
public async prompt()
in ui/src/wizard/AzureWizard.ts
63 15 0
export async function waitForDeploymentToComplete()
in appservice/src/deploy/waitForDeploymentToComplete.ts
61 20 5
export async function confirmOverwriteSettings()
in appservice/src/confirmOverwriteSettings.ts
60 17 4
public connect()
in appservice/src/TunnelProxy.ts
57 3 0
export function parseError()
in ui/src/parseError.ts
55 21 1
subscriptionDisplayName: nonNullProp()
in ui/src/tree/AzureAccountTreeItemBase.ts
55 11 2
private getAdvancedSkus()
in appservice/src/createAppService/AppServicePlanSkuStep.ts
53 1 0
async function tryGetLatestDeployment()
in appservice/src/deploy/waitForDeploymentToComplete.ts
51 15 5
void callWithTelemetryAndErrorHandling()
in appservice/src/startStreamingLogs.ts
49 4 2
public async getChildren()
in ui/src/tree/AzExtTreeDataProvider.ts
48 8 1
export async function showInputBox()
in ui/src/userInput/showInputBox.ts
48 8 2
export async function getDeployFsPath()
in appservice/src/deploy/getDeployFsPath.ts
47 13 3
async run()
in triage-actions/common/Action.js
47 16 0
public static async getLocation()
in ui/src/wizard/LocationListStep.ts
47 13 3
export async function runWithZipStream()
in appservice/src/deploy/runWithZipStream.ts
46 8 4
public async createTreeItemsWithErrorHandling()
in ui/src/tree/AzExtParentTreeItem.ts
46 8 3
for await()
in triage-actions/needs-more-info-closer/NeedsMoreInfoCloser.js
45 16 1