microsoft / vscode-postgresql
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 545 units with 5,687 lines of code in units (59.7% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (307 lines of code)
    • 67 medium size units (1,881 lines of code)
    • 114 small units (1,624 lines of code)
    • 359 very small units (1,875 lines of code)
0% | 5% | 33% | 28% | 32%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 5% | 32% | 28% | 33%
js0% | 0% | 58% | 11% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/models0% | 9% | 32% | 27% | 30%
src/views0% | 9% | 36% | 26% | 27%
src/controllers0% | 0% | 38% | 25% | 35%
src/languageservice0% | 0% | 30% | 39% | 30%
src/prompts0% | 0% | 24% | 35% | 39%
src/connectionconfig0% | 0% | 25% | 43% | 31%
tasks0% | 0% | 33% | 19% | 47%
src/credentialstore0% | 0% | 0% | 88% | 11%
src0% | 0% | 0% | 57% | 42%
src/configurations0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function handleKeyDown()
in src/views/htmlcontent/src/js/slick.dragrowselector.ts
74 23 1
protected static getRequiredCredentialValuesQuestions()
in src/models/connectionCredentials.ts
67 10 4
export function fixupConnectionCredentials()
in src/models/connectionInfo.ts
63 21 1
public promptToManageProfiles()
in src/views/connectionUI.ts
52 6 0
private createQueryRunner()
in src/models/sqlOutputContentProvider.ts
51 4 5
private static getRuntimeIdHelper()
in src/models/platform.ts
49 23 2
function handleClick()
in src/views/htmlcontent/src/js/slick.dragrowselector.ts
44 14 1
public onChooseDatabase()
in src/controllers/connectionManager.ts
42 3 0
public initializeForPlatform()
in src/languageservice/serviceclient.ts
42 5 2
private handleConnectionErrors()
in src/controllers/connectionManager.ts
41 17 3
public rootRequestHandler()
in src/models/sqlOutputContentProvider.ts
41 6 2
(function(global)()
in src/views/htmlcontent/systemjs.config.js
39 1 1
public connect()
in src/controllers/connectionManager.ts
38 4 2
public copyResults()
in src/controllers/queryRunner.ts
38 7 4
public showDatabasesOnCurrentServer()
in src/views/connectionUI.ts
38 4 2
public downloadFile()
in src/languageservice/httpClient.ts
35 8 7
public onRunCurrentStatement()
in src/controllers/mainController.ts
34 8 1
private static getRuntimeId()
in src/models/platform.ts
34 15 3
private createServerOptions()
in src/languageservice/serviceclient.ts
33 7 1
public openLink()
in src/models/sqlOutputContentProvider.ts
33 7 3