microsoft / vscode-extension-telemetry
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 18 units with 239 lines of code in units (48.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (125 lines of code)
    • 4 small units (52 lines of code)
    • 10 very small units (62 lines of code)
0% | 0% | 52% | 21% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 52% | 21% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/common0% | 0% | 59% | 14% | 26%
src/browser0% | 0% | 0% | 78% | 21%
src/node0% | 0% | 0% | 78% | 21%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
private anonymizeFilePaths()
in src/common/baseTelemetryReporter.ts
47 16 2
private removePropertiesWithPossibleUserInfo()
in src/common/baseTelemetryReporter.ts
30 9 1
private getCommonProperties()
in src/common/baseTelemetryReporter.ts
27 7 0
21 7 0
private shouldSendErrorTelemetry()
in src/common/baseTelemetryReporter.ts
18 7 0
private cleanRemoteName()
in src/common/baseTelemetryReporter.ts
12 3 1
constructor()
in src/browser/telemetryReporter.ts
11 3 4
constructor()
in src/node/telemetryReporter.ts
11 3 4
private cloneAndChange()
in src/common/baseTelemetryReporter.ts
9 5 3
private updateUserOptStatus()
in src/common/baseTelemetryReporter.ts
8 4 0
constructor()
in src/common/baseTelemetryAppender.ts
7 2 2
async flush()
in src/common/baseTelemetryAppender.ts
7 2 0
public sendTelemetryEvent()
in src/common/baseTelemetryReporter.ts
7 3 3
private _flushQueues()
in src/common/baseTelemetryAppender.ts
6 1 0
private get extension()
in src/common/baseTelemetryReporter.ts
6 2 0
public sendRawTelemetryEvent()
in src/common/baseTelemetryReporter.ts
6 3 3
flush: async()
in src/browser/telemetryReporter.ts
3 1 0
flush: async()
in src/node/telemetryReporter.ts
3 1 0