microsoft / vscode-azurearmtools
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 1,221 units with 12,490 lines of code in units (78.8% of code).
    • 5 very long units (656 lines of code)
    • 22 long units (1,436 lines of code)
    • 122 medium size units (3,760 lines of code)
    • 185 small units (2,677 lines of code)
    • 887 very small units (3,961 lines of code)
5% | 11% | 30% | 21% | 31%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts5% | 11% | 30% | 21% | 31%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src17% | 15% | 27% | 20% | 19%
src/language9% | 11% | 23% | 10% | 45%
src/documents1% | 10% | 34% | 26% | 27%
src/vscodeIntegration0% | 19% | 29% | 17% | 33%
src/languageclient0% | 29% | 29% | 26% | 14%
ROOT0% | 24% | 44% | 17% | 13%
src/util0% | 0% | 20% | 24% | 55%
src/visitors0% | 0% | 33% | 15% | 51%
src/snippets0% | 0% | 30% | 44% | 24%
src/acquisition0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in src/AzureRMTools.ts
213 32 1
public moveNext()
in src/language/json/JSON.ts
123 36 0
public moveNext()
in src/language/json/Tokenizer.ts
111 28 0
private updateOpenedDocument()
in src/AzureRMTools.ts
108 29 1
public getReferenceSiteInfo()
in src/documents/positionContexts/TemplatePositionContext.ts
101 30 1
private static parseFunctionCall()
in src/language/expressions/TLE.ts
95 26 2
86 18 0
public readToken()
in src/language/expressions/TLE.ts
74 23 0
private static parseExpression()
in src/language/expressions/TLE.ts
72 20 2
private getElementInfo()
in src/vscodeIntegration/Treeview.ts
72 14 2
await callWithTelemetryAndErrorHandling()
in src/languageclient/startArmLanguageServer.ts
71 8 2
private getFunctionCallCompletions()
in src/documents/positionContexts/TemplatePositionContext.ts
70 27 4
export async function selectParameterFile()
in src/documents/parameters/parameterFiles.ts
69 17 3
public static create()
in src/documents/templates/ChildTemplateCodeLens.ts
68 19 5
public async resolve()
in src/documents/templates/deploymentTemplateCodeLenses.ts
68 13 0
67 14 2
export async function addMissingParameters()
in src/documents/parameters/ParameterValues.ts
64 15 5
62 2 0
60 8 0
private getParameterOrVariableNameReplaceInfo()
in src/documents/positionContexts/TemplatePositionContext.ts
59 14 2