microsoft / vscode-azure-account
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 200 units with 2,504 lines of code in units (78.2% of code).
    • 1 very long units (221 lines of code)
    • 1 long units (68 lines of code)
    • 32 medium size units (930 lines of code)
    • 47 small units (684 lines of code)
    • 119 very small units (601 lines of code)
8% | 2% | 37% | 27% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts8% | 2% | 37% | 27% | 23%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/cloudConsole27% | 8% | 25% | 24% | 14%
src/login0% | 0% | 57% | 16% | 25%
src/login/commands0% | 0% | 57% | 13% | 29%
src0% | 0% | 39% | 29% | 31%
src/login/adal0% | 0% | 27% | 50% | 22%
src/login/msal0% | 0% | 0% | 58% | 41%
sample/src0% | 0% | 0% | 77% | 22%
src/utils0% | 0% | 0% | 50% | 50%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function createCloudConsole()
in src/cloudConsole/cloudConsole.ts
221 39 3
function getUploadFile()
in src/cloudConsole/cloudConsole.ts
68 13 2
export async function selectSubscriptions()
in src/login/commands/selectSubscriptions.ts
50 12 0
export function createServer()
in src/login/server.ts
47 7 1
await callWithTelemetryAndErrorHandling()
in src/login/AzureLoginHelper.ts
46 11 2
export async function getEnvironments()
in src/login/environments.ts
44 6 1
async function fetchTenantDetails()
in src/cloudConsole/cloudConsole.ts
36 5 1
async function resize()
in src/cloudConsole/cloudConsoleLauncher.ts
36 11 2
async function loadTenants()
in src/login/updateSubscriptions.ts
36 10 0
export function main()
in src/cloudConsole/cloudConsoleLauncher.ts
35 7 0
await callWithTelemetryAndErrorHandling()
in src/login/commands/selectTenant.ts
35 5 2
function connectSocket()
in src/cloudConsole/cloudConsoleLauncher.ts
34 7 2
32 2 2
constructor()
in src/login/AzureLoginHelper.ts
31 10 1
29 5 1
await callWithTelemetryAndErrorHandling()
in src/login/AzureLoginHelper.ts
27 7 2
export async function loginToCloud()
in src/login/commands/loginToCloud.ts
26 4 0
async function getCustomCloudEnvironment()
in src/login/environments.ts
26 5 2
export async function connectTerminal()
in src/cloudConsole/cloudConsoleLauncher.ts
25 10 5
function uploadFile()
in src/extension.ts
24 7 2