microsoft / sqlops-dataprotocolclient
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 64 units with 1,230 lines of code in units (56.5% of code).
    • 2 very long units (421 lines of code)
    • 4 long units (273 lines of code)
    • 7 medium size units (262 lines of code)
    • 5 small units (83 lines of code)
    • 46 very small units (191 lines of code)
34% | 22% | 21% | 6% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts34% | 22% | 21% | 6% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src34% | 22% | 21% | 6% | 15%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
298 5 1
123 1 1
function asServerCapabilities()
in src/protocolConverter.ts
90 24 1
68 1 1
62 1 1
53 2 1
50 1 1
50 1 1
function asScriptingParams()
in src/codeConverter.ts
42 6 4
34 1 1
function asProviderMetadata()
in src/protocolConverter.ts
33 8 1
28 1 1
25 1 1
public register()
in src/main.ts
20 11 2
function asServiceOptionType()
in src/protocolConverter.ts
18 8 1
16 1 1
public constructor()
in src/main.ts
15 3 5
function buildServiceOption()
in src/protocolConverter.ts
14 2 1
function asConnectionParams()
in src/codeConverter.ts
8 1 2
function asExecutionPlanOptions()
in src/codeConverter.ts
6 3 1