microsoft / vscode-uri
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 21 units with 315 lines of code in units (36.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (62 lines of code)
    • 3 medium size units (87 lines of code)
    • 8 small units (122 lines of code)
    • 9 very small units (44 lines of code)
0% | 19% | 27% | 38% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 19% | 27% | 38% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 19% | 27% | 38% | 13%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
62 22 2
43 22 2
static file()
in src/uri.ts
22 7 1
22 11 2
19 9 2
19 11 6
17 7 1
static isUri()
in src/uri.ts
16 10 1
14 6 2
static parse()
in src/uri.ts
14 7 2
static revive()
in src/uri.ts
12 4 1
11 3 1
7 3 1
6 3 2
get fsPath()
in src/uri.ts
6 2 0
get fsPath()
in src/uri.ts
6 2 0
6 2 1
4 2 2
3 1 2
3 1 1