microsoft / vscode-edge-devtools
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 130 units with 1,808 lines of code in units (43.2% of code).
    • 1 very long units (160 lines of code)
    • 2 long units (135 lines of code)
    • 22 medium size units (690 lines of code)
    • 21 small units (338 lines of code)
    • 84 very small units (485 lines of code)
8% | 7% | 38% | 18% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts8% | 7% | 38% | 18% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src10% | 9% | 40% | 18% | 21%
src/screencast0% | 0% | 33% | 16% | 49%
src/host0% | 0% | 29% | 16% | 53%
src/common0% | 0% | 0% | 45% | 54%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function activate()
in src/extension.ts
160 17 1
76 20 4
private constructor()
in src/devtoolsPanel.ts
59 7 5
constructor()
in src/screencast/screencast.ts
49 4 0
async getChildren()
in src/cdpTargetsProvider.ts
45 16 1
44 15 1
function startWebhint()
in src/extension.ts
42 2 1
private getCdnHtmlForWebview()
in src/devtoolsPanel.ts
41 4 0
36 8 2
private async parseUrlToUri()
in src/devtoolsPanel.ts
35 6 1
private constructor()
in src/screencastPanel.ts
35 3 5
34 6 1
private onSocketTelemetry()
in src/devtoolsPanel.ts
30 4 1
constructor()
in src/screencast/cdp.ts
28 9 0
28 10 1
27 6 2
27 7 3
constructor()
in src/host/messageRouter.ts
26 3 1
26 3 2
async configureLaunchJson()
in src/launchConfigManager.ts
25 3 0