microsoft / vscode-test
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 29 units with 419 lines of code in units (69.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (69 lines of code)
    • 5 medium size units (145 lines of code)
    • 7 small units (105 lines of code)
    • 16 very small units (100 lines of code)
0% | 16% | 34% | 25% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 16% | 34% | 25% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib0% | 16% | 35% | 25% | 22%
sample/src0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
69 11 1
public report()
in lib/progress.ts
39 13 1
32 7 5
28 5 1
25 3 1
21 4 1
18 2 4
18 6 3
17 5 1
15 3 1
14 4 2
12 2 4
11 5 1
10 2 1
10 2 3
10 3 1
9 3 1
9 3 1
7 4 0
7 2 2