microsoft / azuredatastudio
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 42,499 units with 494,867 lines of code in units (46.4% of code).
    • 249 very long units (38,351 lines of code)
    • 932 long units (61,923 lines of code)
    • 4,547 medium size units (137,949 lines of code)
    • 7,886 small units (114,629 lines of code)
    • 28,885 very small units (142,015 lines of code)
7% | 12% | 27% | 23% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts7% | 12% | 27% | 23% | 28%
js12% | 12% | 29% | 23% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/vs6% | 13% | 27% | 24% | 28%
extensions/sql-migration36% | 17% | 22% | 12% | 10%
src/sql4% | 8% | 24% | 23% | 39%
extensions/schema-compare47% | 9% | 21% | 12% | 8%
extensions/arc21% | 20% | 23% | 15% | 18%
extensions/agent41% | 7% | 32% | 9% | 9%
extensions/mssql13% | 10% | 25% | 22% | 28%
extensions/resource-deployment6% | 10% | 36% | 17% | 29%
build/lib5% | 20% | 37% | 20% | 16%
extensions/git6% | 12% | 31% | 23% | 25%
extensions/machine-learning6% | 14% | 26% | 20% | 32%
extensions/big-data-cluster8% | 13% | 39% | 14% | 23%
extensions/json-language-features33% | 7% | 21% | 16% | 20%
build35% | 5% | 30% | 13% | 15%
extensions/sql-database-projects4% | 11% | 36% | 25% | 21%
extensions/azurecore6% | 16% | 27% | 26% | 22%
build/monaco25% | 25% | 13% | 15% | 20%
extensions/import15% | 24% | 27% | 11% | 21%
extensions/liveshare56% | 0% | 31% | 5% | 7%
extensions/notebook3% | 15% | 31% | 25% | 23%
extensions/data-workspace21% | 17% | 18% | 21% | 20%
extensions/github41% | 22% | 7% | 14% | 14%
extensions/markdown-language-features4% | 0% | 26% | 36% | 32%
extensions/sql-assessment10% | 14% | 26% | 23% | 25%
resources/web31% | 0% | 32% | 28% | 7%
build/azure-pipelines0% | 21% | 32% | 24% | 20%
build/npm0% | 52% | 17% | 27% | 2%
extensions/search-result0% | 77% | 19% | 0% | 2%
src0% | 38% | 9% | 32% | 18%
extensions/dacpac0% | 7% | 51% | 21% | 18%
extensions/merge-conflict0% | 15% | 39% | 17% | 27%
extensions/configuration-editing0% | 12% | 42% | 16% | 28%
extensions/admin-tool-ext-win0% | 35% | 22% | 17% | 25%
extensions/microsoft-authentication0% | 8% | 48% | 21% | 22%
build/darwin0% | 30% | 62% | 7% | 0%
extensions/github-authentication0% | 7% | 37% | 31% | 23%
extensions/simple-browser0% | 25% | 0% | 23% | 50%
extensions/cms0% | 5% | 37% | 27% | 29%
extensions/azuremonitor0% | 0% | 33% | 26% | 39%
extensions/kusto0% | 0% | 33% | 26% | 39%
extensions/azcli0% | 0% | 43% | 13% | 42%
extensions/theme-seti0% | 0% | 50% | 41% | 8%
extensions/image-preview0% | 0% | 25% | 37% | 37%
build/actions0% | 0% | 8% | 48% | 43%
build/builtin0% | 0% | 42% | 30% | 27%
extensions/markdown-math0% | 0% | 59% | 0% | 40%
extensions/profiler0% | 0% | 25% | 31% | 42%
extensions0% | 0% | 64% | 35% | 0%
build/linux0% | 0% | 0% | 100% | 0%
extensions/server-report0% | 0% | 0% | 47% | 52%
extensions/json0% | 0% | 0% | 63% | 36%
extensions/xml-language-features0% | 0% | 0% | 0% | 100%
extensions/query-history0% | 0% | 0% | 0% | 100%
extensions/azurehybridtoolkit0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function registerTerminalActions()
in src/vs/workbench/contrib/terminal/browser/terminalActions.ts
758 42 0
export function createApiFactoryAndRegisterActors()
in src/vs/workbench/api/common/extHost.api.impl.ts
749 28 3
protected registerProvider()
in extensions/mssql/src/features.ts
603 2 1
var Tokenizer_1 = function()
in src/sql/base/common/marked/marked.js
490 118 0
description: localize()
in src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
400 29 2
azdata: function()
in src/sql/workbench/api/common/sqlExtHost.api.impl.ts
369 5 1
private registerGlobalActions()
in src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
360 3 0
export function setupTerminalMenus()
in src/vs/workbench/contrib/terminal/browser/terminalMenus.ts
353 1 0
public setSchemaCompareIncludedObjectsUtil()
in extensions/schema-compare/src/models/schemaCompareOptionsModel.ts
349 139 2
public async onPageEnter()
in extensions/sql-migration/src/wizard/databaseBackupPage.ts
345 73 1
async function webviewPreloads()
in src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.ts
345 59 1
export function createExtHostComments()
in src/vs/workbench/api/common/extHostComments.ts
330 47 3
var Lexer_1 = function()
in src/sql/base/common/marked/marked.js
308 65 0
public createDerivedColumn()
in extensions/import/src/dialogs/derivedColumnDialog.ts
267 9 0
private _buildDomNode()
in src/vs/editor/contrib/find/findWidget.ts
267 37 0
private initializeGeneralTab()
in extensions/agent/src/dialogs/operatorDialog.ts
261 28 0
constructor()
in src/vs/editor/common/config/editorOptions.ts
261 1 0
private _initialize()
in src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts
252 59 1
content: localize()
in src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts
247 20 3
private registerListeners()
in src/vs/workbench/contrib/debug/browser/debugSession.ts
244 76 0